@cloudflare/workers-types 4.20241127.0 → 4.20241202.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 +11 -9
- package/2022-03-21/index.ts +7 -7
- package/2022-08-04/index.d.ts +11 -9
- package/2022-08-04/index.ts +7 -7
- package/2022-10-31/index.d.ts +11 -9
- package/2022-10-31/index.ts +7 -7
- package/2022-11-30/index.d.ts +11 -9
- package/2022-11-30/index.ts +7 -7
- package/2023-03-01/index.d.ts +11 -9
- package/2023-03-01/index.ts +7 -7
- package/2023-07-01/index.d.ts +11 -9
- package/2023-07-01/index.ts +7 -7
- package/experimental/index.d.ts +11 -9
- package/experimental/index.ts +7 -7
- 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/2021-11-03/index.d.ts
CHANGED
|
@@ -929,7 +929,7 @@ declare class Blob {
|
|
|
929
929
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
930
930
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
931
931
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
932
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
932
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
933
933
|
bytes(): Promise<Uint8Array>;
|
|
934
934
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
935
935
|
text(): Promise<string>;
|
|
@@ -1505,7 +1505,7 @@ declare abstract class Body {
|
|
|
1505
1505
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1506
1506
|
readonly bodyUsed: boolean;
|
|
1507
1507
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1508
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1508
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1509
1509
|
bytes(): Promise<Uint8Array>;
|
|
1510
1510
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1511
1511
|
text(): Promise<string>;
|
|
@@ -1899,7 +1899,7 @@ declare abstract class R2Object {
|
|
|
1899
1899
|
interface R2ObjectBody extends R2Object {
|
|
1900
1900
|
get body(): ReadableStream;
|
|
1901
1901
|
get bodyUsed(): boolean;
|
|
1902
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1902
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1903
1903
|
text(): Promise<string>;
|
|
1904
1904
|
json<T>(): Promise<T>;
|
|
1905
1905
|
blob(): Promise<Blob>;
|
|
@@ -5290,14 +5290,16 @@ declare module "cloudflare:workers" {
|
|
|
5290
5290
|
export type WorkflowSleepDuration =
|
|
5291
5291
|
| `${number} ${WorkflowDurationLabel}${"s" | ""}`
|
|
5292
5292
|
| number;
|
|
5293
|
+
export type WorkflowDelayDuration = WorkflowSleepDuration;
|
|
5294
|
+
export type WorkflowTimeoutDuration = WorkflowSleepDuration;
|
|
5293
5295
|
export type WorkflowBackoff = "constant" | "linear" | "exponential";
|
|
5294
5296
|
export type WorkflowStepConfig = {
|
|
5295
5297
|
retries?: {
|
|
5296
5298
|
limit: number;
|
|
5297
|
-
delay:
|
|
5299
|
+
delay: WorkflowDelayDuration | number;
|
|
5298
5300
|
backoff?: WorkflowBackoff;
|
|
5299
5301
|
};
|
|
5300
|
-
timeout?:
|
|
5302
|
+
timeout?: WorkflowTimeoutDuration | number;
|
|
5301
5303
|
};
|
|
5302
5304
|
export type WorkflowEvent<T> = {
|
|
5303
5305
|
payload: Readonly<T>;
|
|
@@ -5650,7 +5652,7 @@ declare module "cloudflare:workflows" {
|
|
|
5650
5652
|
public constructor(message: string, name?: string);
|
|
5651
5653
|
}
|
|
5652
5654
|
}
|
|
5653
|
-
declare abstract class Workflow {
|
|
5655
|
+
declare abstract class Workflow<PARAMS = unknown> {
|
|
5654
5656
|
/**
|
|
5655
5657
|
* Get a handle to an existing instance of the Workflow.
|
|
5656
5658
|
* @param id Id for the instance of this Workflow
|
|
@@ -5663,10 +5665,10 @@ declare abstract class Workflow {
|
|
|
5663
5665
|
* @returns A promise that resolves with a handle for the Instance
|
|
5664
5666
|
*/
|
|
5665
5667
|
public create(
|
|
5666
|
-
options?: WorkflowInstanceCreateOptions
|
|
5668
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5667
5669
|
): Promise<WorkflowInstance>;
|
|
5668
5670
|
}
|
|
5669
|
-
interface WorkflowInstanceCreateOptions {
|
|
5671
|
+
interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5670
5672
|
/**
|
|
5671
5673
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5672
5674
|
*/
|
|
@@ -5674,7 +5676,7 @@ interface WorkflowInstanceCreateOptions {
|
|
|
5674
5676
|
/**
|
|
5675
5677
|
* The event payload the Workflow instance is triggered with
|
|
5676
5678
|
*/
|
|
5677
|
-
params?:
|
|
5679
|
+
params?: PARAMS;
|
|
5678
5680
|
}
|
|
5679
5681
|
type InstanceStatus = {
|
|
5680
5682
|
status:
|
package/2021-11-03/index.ts
CHANGED
|
@@ -934,7 +934,7 @@ export declare class Blob {
|
|
|
934
934
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
935
935
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
936
936
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
937
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
937
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
938
938
|
bytes(): Promise<Uint8Array>;
|
|
939
939
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
940
940
|
text(): Promise<string>;
|
|
@@ -1510,7 +1510,7 @@ export declare abstract class Body {
|
|
|
1510
1510
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1511
1511
|
readonly bodyUsed: boolean;
|
|
1512
1512
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1513
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1513
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1514
1514
|
bytes(): Promise<Uint8Array>;
|
|
1515
1515
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1516
1516
|
text(): Promise<string>;
|
|
@@ -1908,7 +1908,7 @@ export declare abstract class R2Object {
|
|
|
1908
1908
|
export interface R2ObjectBody extends R2Object {
|
|
1909
1909
|
get body(): ReadableStream;
|
|
1910
1910
|
get bodyUsed(): boolean;
|
|
1911
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1911
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1912
1912
|
text(): Promise<string>;
|
|
1913
1913
|
json<T>(): Promise<T>;
|
|
1914
1914
|
blob(): Promise<Blob>;
|
|
@@ -5554,7 +5554,7 @@ export interface DispatchNamespace {
|
|
|
5554
5554
|
options?: DynamicDispatchOptions,
|
|
5555
5555
|
): Fetcher;
|
|
5556
5556
|
}
|
|
5557
|
-
export declare abstract class Workflow {
|
|
5557
|
+
export declare abstract class Workflow<PARAMS = unknown> {
|
|
5558
5558
|
/**
|
|
5559
5559
|
* Get a handle to an existing instance of the Workflow.
|
|
5560
5560
|
* @param id Id for the instance of this Workflow
|
|
@@ -5567,10 +5567,10 @@ export declare abstract class Workflow {
|
|
|
5567
5567
|
* @returns A promise that resolves with a handle for the Instance
|
|
5568
5568
|
*/
|
|
5569
5569
|
public create(
|
|
5570
|
-
options?: WorkflowInstanceCreateOptions
|
|
5570
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5571
5571
|
): Promise<WorkflowInstance>;
|
|
5572
5572
|
}
|
|
5573
|
-
export interface WorkflowInstanceCreateOptions {
|
|
5573
|
+
export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5574
5574
|
/**
|
|
5575
5575
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5576
5576
|
*/
|
|
@@ -5578,7 +5578,7 @@ export interface WorkflowInstanceCreateOptions {
|
|
|
5578
5578
|
/**
|
|
5579
5579
|
* The event payload the Workflow instance is triggered with
|
|
5580
5580
|
*/
|
|
5581
|
-
params?:
|
|
5581
|
+
params?: PARAMS;
|
|
5582
5582
|
}
|
|
5583
5583
|
export type InstanceStatus = {
|
|
5584
5584
|
status:
|
package/2022-01-31/index.d.ts
CHANGED
|
@@ -935,7 +935,7 @@ declare class Blob {
|
|
|
935
935
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
936
936
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
937
937
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
938
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
938
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
939
939
|
bytes(): Promise<Uint8Array>;
|
|
940
940
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
941
941
|
text(): Promise<string>;
|
|
@@ -1511,7 +1511,7 @@ declare abstract class Body {
|
|
|
1511
1511
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1512
1512
|
get bodyUsed(): boolean;
|
|
1513
1513
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1514
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1514
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1515
1515
|
bytes(): Promise<Uint8Array>;
|
|
1516
1516
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1517
1517
|
text(): Promise<string>;
|
|
@@ -1905,7 +1905,7 @@ declare abstract class R2Object {
|
|
|
1905
1905
|
interface R2ObjectBody extends R2Object {
|
|
1906
1906
|
get body(): ReadableStream;
|
|
1907
1907
|
get bodyUsed(): boolean;
|
|
1908
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1908
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1909
1909
|
text(): Promise<string>;
|
|
1910
1910
|
json<T>(): Promise<T>;
|
|
1911
1911
|
blob(): Promise<Blob>;
|
|
@@ -5316,14 +5316,16 @@ declare module "cloudflare:workers" {
|
|
|
5316
5316
|
export type WorkflowSleepDuration =
|
|
5317
5317
|
| `${number} ${WorkflowDurationLabel}${"s" | ""}`
|
|
5318
5318
|
| number;
|
|
5319
|
+
export type WorkflowDelayDuration = WorkflowSleepDuration;
|
|
5320
|
+
export type WorkflowTimeoutDuration = WorkflowSleepDuration;
|
|
5319
5321
|
export type WorkflowBackoff = "constant" | "linear" | "exponential";
|
|
5320
5322
|
export type WorkflowStepConfig = {
|
|
5321
5323
|
retries?: {
|
|
5322
5324
|
limit: number;
|
|
5323
|
-
delay:
|
|
5325
|
+
delay: WorkflowDelayDuration | number;
|
|
5324
5326
|
backoff?: WorkflowBackoff;
|
|
5325
5327
|
};
|
|
5326
|
-
timeout?:
|
|
5328
|
+
timeout?: WorkflowTimeoutDuration | number;
|
|
5327
5329
|
};
|
|
5328
5330
|
export type WorkflowEvent<T> = {
|
|
5329
5331
|
payload: Readonly<T>;
|
|
@@ -5676,7 +5678,7 @@ declare module "cloudflare:workflows" {
|
|
|
5676
5678
|
public constructor(message: string, name?: string);
|
|
5677
5679
|
}
|
|
5678
5680
|
}
|
|
5679
|
-
declare abstract class Workflow {
|
|
5681
|
+
declare abstract class Workflow<PARAMS = unknown> {
|
|
5680
5682
|
/**
|
|
5681
5683
|
* Get a handle to an existing instance of the Workflow.
|
|
5682
5684
|
* @param id Id for the instance of this Workflow
|
|
@@ -5689,10 +5691,10 @@ declare abstract class Workflow {
|
|
|
5689
5691
|
* @returns A promise that resolves with a handle for the Instance
|
|
5690
5692
|
*/
|
|
5691
5693
|
public create(
|
|
5692
|
-
options?: WorkflowInstanceCreateOptions
|
|
5694
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5693
5695
|
): Promise<WorkflowInstance>;
|
|
5694
5696
|
}
|
|
5695
|
-
interface WorkflowInstanceCreateOptions {
|
|
5697
|
+
interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5696
5698
|
/**
|
|
5697
5699
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5698
5700
|
*/
|
|
@@ -5700,7 +5702,7 @@ interface WorkflowInstanceCreateOptions {
|
|
|
5700
5702
|
/**
|
|
5701
5703
|
* The event payload the Workflow instance is triggered with
|
|
5702
5704
|
*/
|
|
5703
|
-
params?:
|
|
5705
|
+
params?: PARAMS;
|
|
5704
5706
|
}
|
|
5705
5707
|
type InstanceStatus = {
|
|
5706
5708
|
status:
|
package/2022-01-31/index.ts
CHANGED
|
@@ -940,7 +940,7 @@ export declare class Blob {
|
|
|
940
940
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
941
941
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
942
942
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
943
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
943
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
944
944
|
bytes(): Promise<Uint8Array>;
|
|
945
945
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
946
946
|
text(): Promise<string>;
|
|
@@ -1516,7 +1516,7 @@ export declare abstract class Body {
|
|
|
1516
1516
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1517
1517
|
get bodyUsed(): boolean;
|
|
1518
1518
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1519
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1519
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1520
1520
|
bytes(): Promise<Uint8Array>;
|
|
1521
1521
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1522
1522
|
text(): Promise<string>;
|
|
@@ -1914,7 +1914,7 @@ export declare abstract class R2Object {
|
|
|
1914
1914
|
export interface R2ObjectBody extends R2Object {
|
|
1915
1915
|
get body(): ReadableStream;
|
|
1916
1916
|
get bodyUsed(): boolean;
|
|
1917
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1917
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1918
1918
|
text(): Promise<string>;
|
|
1919
1919
|
json<T>(): Promise<T>;
|
|
1920
1920
|
blob(): Promise<Blob>;
|
|
@@ -5580,7 +5580,7 @@ export interface DispatchNamespace {
|
|
|
5580
5580
|
options?: DynamicDispatchOptions,
|
|
5581
5581
|
): Fetcher;
|
|
5582
5582
|
}
|
|
5583
|
-
export declare abstract class Workflow {
|
|
5583
|
+
export declare abstract class Workflow<PARAMS = unknown> {
|
|
5584
5584
|
/**
|
|
5585
5585
|
* Get a handle to an existing instance of the Workflow.
|
|
5586
5586
|
* @param id Id for the instance of this Workflow
|
|
@@ -5593,10 +5593,10 @@ export declare abstract class Workflow {
|
|
|
5593
5593
|
* @returns A promise that resolves with a handle for the Instance
|
|
5594
5594
|
*/
|
|
5595
5595
|
public create(
|
|
5596
|
-
options?: WorkflowInstanceCreateOptions
|
|
5596
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5597
5597
|
): Promise<WorkflowInstance>;
|
|
5598
5598
|
}
|
|
5599
|
-
export interface WorkflowInstanceCreateOptions {
|
|
5599
|
+
export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5600
5600
|
/**
|
|
5601
5601
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5602
5602
|
*/
|
|
@@ -5604,7 +5604,7 @@ export interface WorkflowInstanceCreateOptions {
|
|
|
5604
5604
|
/**
|
|
5605
5605
|
* The event payload the Workflow instance is triggered with
|
|
5606
5606
|
*/
|
|
5607
|
-
params?:
|
|
5607
|
+
params?: PARAMS;
|
|
5608
5608
|
}
|
|
5609
5609
|
export type InstanceStatus = {
|
|
5610
5610
|
status:
|
package/2022-03-21/index.d.ts
CHANGED
|
@@ -952,7 +952,7 @@ declare class Blob {
|
|
|
952
952
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
953
953
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
954
954
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
955
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
955
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
956
956
|
bytes(): Promise<Uint8Array>;
|
|
957
957
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
958
958
|
text(): Promise<string>;
|
|
@@ -1528,7 +1528,7 @@ declare abstract class Body {
|
|
|
1528
1528
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1529
1529
|
get bodyUsed(): boolean;
|
|
1530
1530
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1531
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1531
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1532
1532
|
bytes(): Promise<Uint8Array>;
|
|
1533
1533
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1534
1534
|
text(): Promise<string>;
|
|
@@ -1922,7 +1922,7 @@ declare abstract class R2Object {
|
|
|
1922
1922
|
interface R2ObjectBody extends R2Object {
|
|
1923
1923
|
get body(): ReadableStream;
|
|
1924
1924
|
get bodyUsed(): boolean;
|
|
1925
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1925
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1926
1926
|
text(): Promise<string>;
|
|
1927
1927
|
json<T>(): Promise<T>;
|
|
1928
1928
|
blob(): Promise<Blob>;
|
|
@@ -5340,14 +5340,16 @@ declare module "cloudflare:workers" {
|
|
|
5340
5340
|
export type WorkflowSleepDuration =
|
|
5341
5341
|
| `${number} ${WorkflowDurationLabel}${"s" | ""}`
|
|
5342
5342
|
| number;
|
|
5343
|
+
export type WorkflowDelayDuration = WorkflowSleepDuration;
|
|
5344
|
+
export type WorkflowTimeoutDuration = WorkflowSleepDuration;
|
|
5343
5345
|
export type WorkflowBackoff = "constant" | "linear" | "exponential";
|
|
5344
5346
|
export type WorkflowStepConfig = {
|
|
5345
5347
|
retries?: {
|
|
5346
5348
|
limit: number;
|
|
5347
|
-
delay:
|
|
5349
|
+
delay: WorkflowDelayDuration | number;
|
|
5348
5350
|
backoff?: WorkflowBackoff;
|
|
5349
5351
|
};
|
|
5350
|
-
timeout?:
|
|
5352
|
+
timeout?: WorkflowTimeoutDuration | number;
|
|
5351
5353
|
};
|
|
5352
5354
|
export type WorkflowEvent<T> = {
|
|
5353
5355
|
payload: Readonly<T>;
|
|
@@ -5700,7 +5702,7 @@ declare module "cloudflare:workflows" {
|
|
|
5700
5702
|
public constructor(message: string, name?: string);
|
|
5701
5703
|
}
|
|
5702
5704
|
}
|
|
5703
|
-
declare abstract class Workflow {
|
|
5705
|
+
declare abstract class Workflow<PARAMS = unknown> {
|
|
5704
5706
|
/**
|
|
5705
5707
|
* Get a handle to an existing instance of the Workflow.
|
|
5706
5708
|
* @param id Id for the instance of this Workflow
|
|
@@ -5713,10 +5715,10 @@ declare abstract class Workflow {
|
|
|
5713
5715
|
* @returns A promise that resolves with a handle for the Instance
|
|
5714
5716
|
*/
|
|
5715
5717
|
public create(
|
|
5716
|
-
options?: WorkflowInstanceCreateOptions
|
|
5718
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5717
5719
|
): Promise<WorkflowInstance>;
|
|
5718
5720
|
}
|
|
5719
|
-
interface WorkflowInstanceCreateOptions {
|
|
5721
|
+
interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5720
5722
|
/**
|
|
5721
5723
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5722
5724
|
*/
|
|
@@ -5724,7 +5726,7 @@ interface WorkflowInstanceCreateOptions {
|
|
|
5724
5726
|
/**
|
|
5725
5727
|
* The event payload the Workflow instance is triggered with
|
|
5726
5728
|
*/
|
|
5727
|
-
params?:
|
|
5729
|
+
params?: PARAMS;
|
|
5728
5730
|
}
|
|
5729
5731
|
type InstanceStatus = {
|
|
5730
5732
|
status:
|
package/2022-03-21/index.ts
CHANGED
|
@@ -957,7 +957,7 @@ export declare class Blob {
|
|
|
957
957
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
958
958
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
959
959
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
960
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
960
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
961
961
|
bytes(): Promise<Uint8Array>;
|
|
962
962
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
963
963
|
text(): Promise<string>;
|
|
@@ -1533,7 +1533,7 @@ export declare abstract class Body {
|
|
|
1533
1533
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1534
1534
|
get bodyUsed(): boolean;
|
|
1535
1535
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1536
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1536
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1537
1537
|
bytes(): Promise<Uint8Array>;
|
|
1538
1538
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1539
1539
|
text(): Promise<string>;
|
|
@@ -1931,7 +1931,7 @@ export declare abstract class R2Object {
|
|
|
1931
1931
|
export interface R2ObjectBody extends R2Object {
|
|
1932
1932
|
get body(): ReadableStream;
|
|
1933
1933
|
get bodyUsed(): boolean;
|
|
1934
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1934
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1935
1935
|
text(): Promise<string>;
|
|
1936
1936
|
json<T>(): Promise<T>;
|
|
1937
1937
|
blob(): Promise<Blob>;
|
|
@@ -5604,7 +5604,7 @@ export interface DispatchNamespace {
|
|
|
5604
5604
|
options?: DynamicDispatchOptions,
|
|
5605
5605
|
): Fetcher;
|
|
5606
5606
|
}
|
|
5607
|
-
export declare abstract class Workflow {
|
|
5607
|
+
export declare abstract class Workflow<PARAMS = unknown> {
|
|
5608
5608
|
/**
|
|
5609
5609
|
* Get a handle to an existing instance of the Workflow.
|
|
5610
5610
|
* @param id Id for the instance of this Workflow
|
|
@@ -5617,10 +5617,10 @@ export declare abstract class Workflow {
|
|
|
5617
5617
|
* @returns A promise that resolves with a handle for the Instance
|
|
5618
5618
|
*/
|
|
5619
5619
|
public create(
|
|
5620
|
-
options?: WorkflowInstanceCreateOptions
|
|
5620
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5621
5621
|
): Promise<WorkflowInstance>;
|
|
5622
5622
|
}
|
|
5623
|
-
export interface WorkflowInstanceCreateOptions {
|
|
5623
|
+
export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5624
5624
|
/**
|
|
5625
5625
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5626
5626
|
*/
|
|
@@ -5628,7 +5628,7 @@ export interface WorkflowInstanceCreateOptions {
|
|
|
5628
5628
|
/**
|
|
5629
5629
|
* The event payload the Workflow instance is triggered with
|
|
5630
5630
|
*/
|
|
5631
|
-
params?:
|
|
5631
|
+
params?: PARAMS;
|
|
5632
5632
|
}
|
|
5633
5633
|
export type InstanceStatus = {
|
|
5634
5634
|
status:
|
package/2022-08-04/index.d.ts
CHANGED
|
@@ -952,7 +952,7 @@ declare class Blob {
|
|
|
952
952
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
953
953
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
954
954
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
955
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
955
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
956
956
|
bytes(): Promise<Uint8Array>;
|
|
957
957
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
958
958
|
text(): Promise<string>;
|
|
@@ -1528,7 +1528,7 @@ declare abstract class Body {
|
|
|
1528
1528
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1529
1529
|
get bodyUsed(): boolean;
|
|
1530
1530
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1531
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1531
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1532
1532
|
bytes(): Promise<Uint8Array>;
|
|
1533
1533
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1534
1534
|
text(): Promise<string>;
|
|
@@ -1923,7 +1923,7 @@ declare abstract class R2Object {
|
|
|
1923
1923
|
interface R2ObjectBody extends R2Object {
|
|
1924
1924
|
get body(): ReadableStream;
|
|
1925
1925
|
get bodyUsed(): boolean;
|
|
1926
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1926
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1927
1927
|
text(): Promise<string>;
|
|
1928
1928
|
json<T>(): Promise<T>;
|
|
1929
1929
|
blob(): Promise<Blob>;
|
|
@@ -5341,14 +5341,16 @@ declare module "cloudflare:workers" {
|
|
|
5341
5341
|
export type WorkflowSleepDuration =
|
|
5342
5342
|
| `${number} ${WorkflowDurationLabel}${"s" | ""}`
|
|
5343
5343
|
| number;
|
|
5344
|
+
export type WorkflowDelayDuration = WorkflowSleepDuration;
|
|
5345
|
+
export type WorkflowTimeoutDuration = WorkflowSleepDuration;
|
|
5344
5346
|
export type WorkflowBackoff = "constant" | "linear" | "exponential";
|
|
5345
5347
|
export type WorkflowStepConfig = {
|
|
5346
5348
|
retries?: {
|
|
5347
5349
|
limit: number;
|
|
5348
|
-
delay:
|
|
5350
|
+
delay: WorkflowDelayDuration | number;
|
|
5349
5351
|
backoff?: WorkflowBackoff;
|
|
5350
5352
|
};
|
|
5351
|
-
timeout?:
|
|
5353
|
+
timeout?: WorkflowTimeoutDuration | number;
|
|
5352
5354
|
};
|
|
5353
5355
|
export type WorkflowEvent<T> = {
|
|
5354
5356
|
payload: Readonly<T>;
|
|
@@ -5701,7 +5703,7 @@ declare module "cloudflare:workflows" {
|
|
|
5701
5703
|
public constructor(message: string, name?: string);
|
|
5702
5704
|
}
|
|
5703
5705
|
}
|
|
5704
|
-
declare abstract class Workflow {
|
|
5706
|
+
declare abstract class Workflow<PARAMS = unknown> {
|
|
5705
5707
|
/**
|
|
5706
5708
|
* Get a handle to an existing instance of the Workflow.
|
|
5707
5709
|
* @param id Id for the instance of this Workflow
|
|
@@ -5714,10 +5716,10 @@ declare abstract class Workflow {
|
|
|
5714
5716
|
* @returns A promise that resolves with a handle for the Instance
|
|
5715
5717
|
*/
|
|
5716
5718
|
public create(
|
|
5717
|
-
options?: WorkflowInstanceCreateOptions
|
|
5719
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5718
5720
|
): Promise<WorkflowInstance>;
|
|
5719
5721
|
}
|
|
5720
|
-
interface WorkflowInstanceCreateOptions {
|
|
5722
|
+
interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5721
5723
|
/**
|
|
5722
5724
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5723
5725
|
*/
|
|
@@ -5725,7 +5727,7 @@ interface WorkflowInstanceCreateOptions {
|
|
|
5725
5727
|
/**
|
|
5726
5728
|
* The event payload the Workflow instance is triggered with
|
|
5727
5729
|
*/
|
|
5728
|
-
params?:
|
|
5730
|
+
params?: PARAMS;
|
|
5729
5731
|
}
|
|
5730
5732
|
type InstanceStatus = {
|
|
5731
5733
|
status:
|
package/2022-08-04/index.ts
CHANGED
|
@@ -957,7 +957,7 @@ export declare class Blob {
|
|
|
957
957
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
958
958
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
959
959
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
960
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
960
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
961
961
|
bytes(): Promise<Uint8Array>;
|
|
962
962
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
963
963
|
text(): Promise<string>;
|
|
@@ -1533,7 +1533,7 @@ export declare abstract class Body {
|
|
|
1533
1533
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1534
1534
|
get bodyUsed(): boolean;
|
|
1535
1535
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1536
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1536
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1537
1537
|
bytes(): Promise<Uint8Array>;
|
|
1538
1538
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1539
1539
|
text(): Promise<string>;
|
|
@@ -1932,7 +1932,7 @@ export declare abstract class R2Object {
|
|
|
1932
1932
|
export interface R2ObjectBody extends R2Object {
|
|
1933
1933
|
get body(): ReadableStream;
|
|
1934
1934
|
get bodyUsed(): boolean;
|
|
1935
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1935
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1936
1936
|
text(): Promise<string>;
|
|
1937
1937
|
json<T>(): Promise<T>;
|
|
1938
1938
|
blob(): Promise<Blob>;
|
|
@@ -5605,7 +5605,7 @@ export interface DispatchNamespace {
|
|
|
5605
5605
|
options?: DynamicDispatchOptions,
|
|
5606
5606
|
): Fetcher;
|
|
5607
5607
|
}
|
|
5608
|
-
export declare abstract class Workflow {
|
|
5608
|
+
export declare abstract class Workflow<PARAMS = unknown> {
|
|
5609
5609
|
/**
|
|
5610
5610
|
* Get a handle to an existing instance of the Workflow.
|
|
5611
5611
|
* @param id Id for the instance of this Workflow
|
|
@@ -5618,10 +5618,10 @@ export declare abstract class Workflow {
|
|
|
5618
5618
|
* @returns A promise that resolves with a handle for the Instance
|
|
5619
5619
|
*/
|
|
5620
5620
|
public create(
|
|
5621
|
-
options?: WorkflowInstanceCreateOptions
|
|
5621
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5622
5622
|
): Promise<WorkflowInstance>;
|
|
5623
5623
|
}
|
|
5624
|
-
export interface WorkflowInstanceCreateOptions {
|
|
5624
|
+
export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5625
5625
|
/**
|
|
5626
5626
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5627
5627
|
*/
|
|
@@ -5629,7 +5629,7 @@ export interface WorkflowInstanceCreateOptions {
|
|
|
5629
5629
|
/**
|
|
5630
5630
|
* The event payload the Workflow instance is triggered with
|
|
5631
5631
|
*/
|
|
5632
|
-
params?:
|
|
5632
|
+
params?: PARAMS;
|
|
5633
5633
|
}
|
|
5634
5634
|
export type InstanceStatus = {
|
|
5635
5635
|
status:
|
package/2022-10-31/index.d.ts
CHANGED
|
@@ -952,7 +952,7 @@ declare class Blob {
|
|
|
952
952
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
953
953
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
954
954
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
955
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
955
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
956
956
|
bytes(): Promise<Uint8Array>;
|
|
957
957
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
958
958
|
text(): Promise<string>;
|
|
@@ -1528,7 +1528,7 @@ declare abstract class Body {
|
|
|
1528
1528
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1529
1529
|
get bodyUsed(): boolean;
|
|
1530
1530
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1531
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1531
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1532
1532
|
bytes(): Promise<Uint8Array>;
|
|
1533
1533
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1534
1534
|
text(): Promise<string>;
|
|
@@ -1923,7 +1923,7 @@ declare abstract class R2Object {
|
|
|
1923
1923
|
interface R2ObjectBody extends R2Object {
|
|
1924
1924
|
get body(): ReadableStream;
|
|
1925
1925
|
get bodyUsed(): boolean;
|
|
1926
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1926
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1927
1927
|
text(): Promise<string>;
|
|
1928
1928
|
json<T>(): Promise<T>;
|
|
1929
1929
|
blob(): Promise<Blob>;
|
|
@@ -5344,14 +5344,16 @@ declare module "cloudflare:workers" {
|
|
|
5344
5344
|
export type WorkflowSleepDuration =
|
|
5345
5345
|
| `${number} ${WorkflowDurationLabel}${"s" | ""}`
|
|
5346
5346
|
| number;
|
|
5347
|
+
export type WorkflowDelayDuration = WorkflowSleepDuration;
|
|
5348
|
+
export type WorkflowTimeoutDuration = WorkflowSleepDuration;
|
|
5347
5349
|
export type WorkflowBackoff = "constant" | "linear" | "exponential";
|
|
5348
5350
|
export type WorkflowStepConfig = {
|
|
5349
5351
|
retries?: {
|
|
5350
5352
|
limit: number;
|
|
5351
|
-
delay:
|
|
5353
|
+
delay: WorkflowDelayDuration | number;
|
|
5352
5354
|
backoff?: WorkflowBackoff;
|
|
5353
5355
|
};
|
|
5354
|
-
timeout?:
|
|
5356
|
+
timeout?: WorkflowTimeoutDuration | number;
|
|
5355
5357
|
};
|
|
5356
5358
|
export type WorkflowEvent<T> = {
|
|
5357
5359
|
payload: Readonly<T>;
|
|
@@ -5704,7 +5706,7 @@ declare module "cloudflare:workflows" {
|
|
|
5704
5706
|
public constructor(message: string, name?: string);
|
|
5705
5707
|
}
|
|
5706
5708
|
}
|
|
5707
|
-
declare abstract class Workflow {
|
|
5709
|
+
declare abstract class Workflow<PARAMS = unknown> {
|
|
5708
5710
|
/**
|
|
5709
5711
|
* Get a handle to an existing instance of the Workflow.
|
|
5710
5712
|
* @param id Id for the instance of this Workflow
|
|
@@ -5717,10 +5719,10 @@ declare abstract class Workflow {
|
|
|
5717
5719
|
* @returns A promise that resolves with a handle for the Instance
|
|
5718
5720
|
*/
|
|
5719
5721
|
public create(
|
|
5720
|
-
options?: WorkflowInstanceCreateOptions
|
|
5722
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5721
5723
|
): Promise<WorkflowInstance>;
|
|
5722
5724
|
}
|
|
5723
|
-
interface WorkflowInstanceCreateOptions {
|
|
5725
|
+
interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5724
5726
|
/**
|
|
5725
5727
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5726
5728
|
*/
|
|
@@ -5728,7 +5730,7 @@ interface WorkflowInstanceCreateOptions {
|
|
|
5728
5730
|
/**
|
|
5729
5731
|
* The event payload the Workflow instance is triggered with
|
|
5730
5732
|
*/
|
|
5731
|
-
params?:
|
|
5733
|
+
params?: PARAMS;
|
|
5732
5734
|
}
|
|
5733
5735
|
type InstanceStatus = {
|
|
5734
5736
|
status:
|
package/2022-10-31/index.ts
CHANGED
|
@@ -957,7 +957,7 @@ export declare class Blob {
|
|
|
957
957
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
958
958
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
959
959
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
960
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
960
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
961
961
|
bytes(): Promise<Uint8Array>;
|
|
962
962
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
963
963
|
text(): Promise<string>;
|
|
@@ -1533,7 +1533,7 @@ export declare abstract class Body {
|
|
|
1533
1533
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1534
1534
|
get bodyUsed(): boolean;
|
|
1535
1535
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1536
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1536
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1537
1537
|
bytes(): Promise<Uint8Array>;
|
|
1538
1538
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1539
1539
|
text(): Promise<string>;
|
|
@@ -1932,7 +1932,7 @@ export declare abstract class R2Object {
|
|
|
1932
1932
|
export interface R2ObjectBody extends R2Object {
|
|
1933
1933
|
get body(): ReadableStream;
|
|
1934
1934
|
get bodyUsed(): boolean;
|
|
1935
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1935
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1936
1936
|
text(): Promise<string>;
|
|
1937
1937
|
json<T>(): Promise<T>;
|
|
1938
1938
|
blob(): Promise<Blob>;
|
|
@@ -5608,7 +5608,7 @@ export interface DispatchNamespace {
|
|
|
5608
5608
|
options?: DynamicDispatchOptions,
|
|
5609
5609
|
): Fetcher;
|
|
5610
5610
|
}
|
|
5611
|
-
export declare abstract class Workflow {
|
|
5611
|
+
export declare abstract class Workflow<PARAMS = unknown> {
|
|
5612
5612
|
/**
|
|
5613
5613
|
* Get a handle to an existing instance of the Workflow.
|
|
5614
5614
|
* @param id Id for the instance of this Workflow
|
|
@@ -5621,10 +5621,10 @@ export declare abstract class Workflow {
|
|
|
5621
5621
|
* @returns A promise that resolves with a handle for the Instance
|
|
5622
5622
|
*/
|
|
5623
5623
|
public create(
|
|
5624
|
-
options?: WorkflowInstanceCreateOptions
|
|
5624
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5625
5625
|
): Promise<WorkflowInstance>;
|
|
5626
5626
|
}
|
|
5627
|
-
export interface WorkflowInstanceCreateOptions {
|
|
5627
|
+
export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5628
5628
|
/**
|
|
5629
5629
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5630
5630
|
*/
|
|
@@ -5632,7 +5632,7 @@ export interface WorkflowInstanceCreateOptions {
|
|
|
5632
5632
|
/**
|
|
5633
5633
|
* The event payload the Workflow instance is triggered with
|
|
5634
5634
|
*/
|
|
5635
|
-
params?:
|
|
5635
|
+
params?: PARAMS;
|
|
5636
5636
|
}
|
|
5637
5637
|
export type InstanceStatus = {
|
|
5638
5638
|
status:
|