@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/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
|
@@ -457,8 +457,9 @@ declare abstract class Navigator {
|
|
|
457
457
|
| string
|
|
458
458
|
| (ArrayBuffer | ArrayBufferView)
|
|
459
459
|
| Blob
|
|
460
|
+
| FormData
|
|
460
461
|
| URLSearchParams
|
|
461
|
-
|
|
|
462
|
+
| URLSearchParams,
|
|
462
463
|
): boolean;
|
|
463
464
|
readonly userAgent: string;
|
|
464
465
|
readonly gpu: GPU;
|
|
@@ -952,7 +953,7 @@ declare class Blob {
|
|
|
952
953
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
953
954
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
954
955
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
955
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
956
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
956
957
|
bytes(): Promise<Uint8Array>;
|
|
957
958
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
958
959
|
text(): Promise<string>;
|
|
@@ -1528,7 +1529,7 @@ declare abstract class Body {
|
|
|
1528
1529
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1529
1530
|
get bodyUsed(): boolean;
|
|
1530
1531
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1531
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1532
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1532
1533
|
bytes(): Promise<Uint8Array>;
|
|
1533
1534
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1534
1535
|
text(): Promise<string>;
|
|
@@ -1922,7 +1923,7 @@ declare abstract class R2Object {
|
|
|
1922
1923
|
interface R2ObjectBody extends R2Object {
|
|
1923
1924
|
get body(): ReadableStream;
|
|
1924
1925
|
get bodyUsed(): boolean;
|
|
1925
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1926
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1926
1927
|
text(): Promise<string>;
|
|
1927
1928
|
json<T>(): Promise<T>;
|
|
1928
1929
|
blob(): Promise<Blob>;
|
|
@@ -5340,14 +5341,16 @@ declare module "cloudflare:workers" {
|
|
|
5340
5341
|
export type WorkflowSleepDuration =
|
|
5341
5342
|
| `${number} ${WorkflowDurationLabel}${"s" | ""}`
|
|
5342
5343
|
| number;
|
|
5344
|
+
export type WorkflowDelayDuration = WorkflowSleepDuration;
|
|
5345
|
+
export type WorkflowTimeoutDuration = WorkflowSleepDuration;
|
|
5343
5346
|
export type WorkflowBackoff = "constant" | "linear" | "exponential";
|
|
5344
5347
|
export type WorkflowStepConfig = {
|
|
5345
5348
|
retries?: {
|
|
5346
5349
|
limit: number;
|
|
5347
|
-
delay:
|
|
5350
|
+
delay: WorkflowDelayDuration | number;
|
|
5348
5351
|
backoff?: WorkflowBackoff;
|
|
5349
5352
|
};
|
|
5350
|
-
timeout?:
|
|
5353
|
+
timeout?: WorkflowTimeoutDuration | number;
|
|
5351
5354
|
};
|
|
5352
5355
|
export type WorkflowEvent<T> = {
|
|
5353
5356
|
payload: Readonly<T>;
|
|
@@ -5700,7 +5703,7 @@ declare module "cloudflare:workflows" {
|
|
|
5700
5703
|
public constructor(message: string, name?: string);
|
|
5701
5704
|
}
|
|
5702
5705
|
}
|
|
5703
|
-
declare abstract class Workflow {
|
|
5706
|
+
declare abstract class Workflow<PARAMS = unknown> {
|
|
5704
5707
|
/**
|
|
5705
5708
|
* Get a handle to an existing instance of the Workflow.
|
|
5706
5709
|
* @param id Id for the instance of this Workflow
|
|
@@ -5713,10 +5716,10 @@ declare abstract class Workflow {
|
|
|
5713
5716
|
* @returns A promise that resolves with a handle for the Instance
|
|
5714
5717
|
*/
|
|
5715
5718
|
public create(
|
|
5716
|
-
options?: WorkflowInstanceCreateOptions
|
|
5719
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5717
5720
|
): Promise<WorkflowInstance>;
|
|
5718
5721
|
}
|
|
5719
|
-
interface WorkflowInstanceCreateOptions {
|
|
5722
|
+
interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5720
5723
|
/**
|
|
5721
5724
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5722
5725
|
*/
|
|
@@ -5724,7 +5727,7 @@ interface WorkflowInstanceCreateOptions {
|
|
|
5724
5727
|
/**
|
|
5725
5728
|
* The event payload the Workflow instance is triggered with
|
|
5726
5729
|
*/
|
|
5727
|
-
params?:
|
|
5730
|
+
params?: PARAMS;
|
|
5728
5731
|
}
|
|
5729
5732
|
type InstanceStatus = {
|
|
5730
5733
|
status:
|
package/2022-03-21/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>;
|
|
@@ -1931,7 +1932,7 @@ export declare abstract class R2Object {
|
|
|
1931
1932
|
export interface R2ObjectBody extends R2Object {
|
|
1932
1933
|
get body(): ReadableStream;
|
|
1933
1934
|
get bodyUsed(): boolean;
|
|
1934
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1935
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1935
1936
|
text(): Promise<string>;
|
|
1936
1937
|
json<T>(): Promise<T>;
|
|
1937
1938
|
blob(): Promise<Blob>;
|
|
@@ -5604,7 +5605,7 @@ export interface DispatchNamespace {
|
|
|
5604
5605
|
options?: DynamicDispatchOptions,
|
|
5605
5606
|
): Fetcher;
|
|
5606
5607
|
}
|
|
5607
|
-
export declare abstract class Workflow {
|
|
5608
|
+
export declare abstract class Workflow<PARAMS = unknown> {
|
|
5608
5609
|
/**
|
|
5609
5610
|
* Get a handle to an existing instance of the Workflow.
|
|
5610
5611
|
* @param id Id for the instance of this Workflow
|
|
@@ -5617,10 +5618,10 @@ export declare abstract class Workflow {
|
|
|
5617
5618
|
* @returns A promise that resolves with a handle for the Instance
|
|
5618
5619
|
*/
|
|
5619
5620
|
public create(
|
|
5620
|
-
options?: WorkflowInstanceCreateOptions
|
|
5621
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5621
5622
|
): Promise<WorkflowInstance>;
|
|
5622
5623
|
}
|
|
5623
|
-
export interface WorkflowInstanceCreateOptions {
|
|
5624
|
+
export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5624
5625
|
/**
|
|
5625
5626
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5626
5627
|
*/
|
|
@@ -5628,7 +5629,7 @@ export interface WorkflowInstanceCreateOptions {
|
|
|
5628
5629
|
/**
|
|
5629
5630
|
* The event payload the Workflow instance is triggered with
|
|
5630
5631
|
*/
|
|
5631
|
-
params?:
|
|
5632
|
+
params?: PARAMS;
|
|
5632
5633
|
}
|
|
5633
5634
|
export type InstanceStatus = {
|
|
5634
5635
|
status:
|
package/2022-08-04/index.d.ts
CHANGED
|
@@ -457,8 +457,9 @@ declare abstract class Navigator {
|
|
|
457
457
|
| string
|
|
458
458
|
| (ArrayBuffer | ArrayBufferView)
|
|
459
459
|
| Blob
|
|
460
|
+
| FormData
|
|
460
461
|
| URLSearchParams
|
|
461
|
-
|
|
|
462
|
+
| URLSearchParams,
|
|
462
463
|
): boolean;
|
|
463
464
|
readonly userAgent: string;
|
|
464
465
|
readonly gpu: GPU;
|
|
@@ -952,7 +953,7 @@ declare class Blob {
|
|
|
952
953
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
953
954
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
954
955
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
955
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
956
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
956
957
|
bytes(): Promise<Uint8Array>;
|
|
957
958
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
958
959
|
text(): Promise<string>;
|
|
@@ -1528,7 +1529,7 @@ declare abstract class Body {
|
|
|
1528
1529
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1529
1530
|
get bodyUsed(): boolean;
|
|
1530
1531
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1531
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1532
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1532
1533
|
bytes(): Promise<Uint8Array>;
|
|
1533
1534
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1534
1535
|
text(): Promise<string>;
|
|
@@ -1923,7 +1924,7 @@ declare abstract class R2Object {
|
|
|
1923
1924
|
interface R2ObjectBody extends R2Object {
|
|
1924
1925
|
get body(): ReadableStream;
|
|
1925
1926
|
get bodyUsed(): boolean;
|
|
1926
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1927
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1927
1928
|
text(): Promise<string>;
|
|
1928
1929
|
json<T>(): Promise<T>;
|
|
1929
1930
|
blob(): Promise<Blob>;
|
|
@@ -5341,14 +5342,16 @@ declare module "cloudflare:workers" {
|
|
|
5341
5342
|
export type WorkflowSleepDuration =
|
|
5342
5343
|
| `${number} ${WorkflowDurationLabel}${"s" | ""}`
|
|
5343
5344
|
| number;
|
|
5345
|
+
export type WorkflowDelayDuration = WorkflowSleepDuration;
|
|
5346
|
+
export type WorkflowTimeoutDuration = WorkflowSleepDuration;
|
|
5344
5347
|
export type WorkflowBackoff = "constant" | "linear" | "exponential";
|
|
5345
5348
|
export type WorkflowStepConfig = {
|
|
5346
5349
|
retries?: {
|
|
5347
5350
|
limit: number;
|
|
5348
|
-
delay:
|
|
5351
|
+
delay: WorkflowDelayDuration | number;
|
|
5349
5352
|
backoff?: WorkflowBackoff;
|
|
5350
5353
|
};
|
|
5351
|
-
timeout?:
|
|
5354
|
+
timeout?: WorkflowTimeoutDuration | number;
|
|
5352
5355
|
};
|
|
5353
5356
|
export type WorkflowEvent<T> = {
|
|
5354
5357
|
payload: Readonly<T>;
|
|
@@ -5701,7 +5704,7 @@ declare module "cloudflare:workflows" {
|
|
|
5701
5704
|
public constructor(message: string, name?: string);
|
|
5702
5705
|
}
|
|
5703
5706
|
}
|
|
5704
|
-
declare abstract class Workflow {
|
|
5707
|
+
declare abstract class Workflow<PARAMS = unknown> {
|
|
5705
5708
|
/**
|
|
5706
5709
|
* Get a handle to an existing instance of the Workflow.
|
|
5707
5710
|
* @param id Id for the instance of this Workflow
|
|
@@ -5714,10 +5717,10 @@ declare abstract class Workflow {
|
|
|
5714
5717
|
* @returns A promise that resolves with a handle for the Instance
|
|
5715
5718
|
*/
|
|
5716
5719
|
public create(
|
|
5717
|
-
options?: WorkflowInstanceCreateOptions
|
|
5720
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5718
5721
|
): Promise<WorkflowInstance>;
|
|
5719
5722
|
}
|
|
5720
|
-
interface WorkflowInstanceCreateOptions {
|
|
5723
|
+
interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5721
5724
|
/**
|
|
5722
5725
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5723
5726
|
*/
|
|
@@ -5725,7 +5728,7 @@ interface WorkflowInstanceCreateOptions {
|
|
|
5725
5728
|
/**
|
|
5726
5729
|
* The event payload the Workflow instance is triggered with
|
|
5727
5730
|
*/
|
|
5728
|
-
params?:
|
|
5731
|
+
params?: PARAMS;
|
|
5729
5732
|
}
|
|
5730
5733
|
type InstanceStatus = {
|
|
5731
5734
|
status:
|
package/2022-08-04/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>;
|
|
@@ -5605,7 +5606,7 @@ export interface DispatchNamespace {
|
|
|
5605
5606
|
options?: DynamicDispatchOptions,
|
|
5606
5607
|
): Fetcher;
|
|
5607
5608
|
}
|
|
5608
|
-
export declare abstract class Workflow {
|
|
5609
|
+
export declare abstract class Workflow<PARAMS = unknown> {
|
|
5609
5610
|
/**
|
|
5610
5611
|
* Get a handle to an existing instance of the Workflow.
|
|
5611
5612
|
* @param id Id for the instance of this Workflow
|
|
@@ -5618,10 +5619,10 @@ export declare abstract class Workflow {
|
|
|
5618
5619
|
* @returns A promise that resolves with a handle for the Instance
|
|
5619
5620
|
*/
|
|
5620
5621
|
public create(
|
|
5621
|
-
options?: WorkflowInstanceCreateOptions
|
|
5622
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5622
5623
|
): Promise<WorkflowInstance>;
|
|
5623
5624
|
}
|
|
5624
|
-
export interface WorkflowInstanceCreateOptions {
|
|
5625
|
+
export interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5625
5626
|
/**
|
|
5626
5627
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5627
5628
|
*/
|
|
@@ -5629,7 +5630,7 @@ export interface WorkflowInstanceCreateOptions {
|
|
|
5629
5630
|
/**
|
|
5630
5631
|
* The event payload the Workflow instance is triggered with
|
|
5631
5632
|
*/
|
|
5632
|
-
params?:
|
|
5633
|
+
params?: PARAMS;
|
|
5633
5634
|
}
|
|
5634
5635
|
export type InstanceStatus = {
|
|
5635
5636
|
status:
|
package/2022-10-31/index.d.ts
CHANGED
|
@@ -457,8 +457,9 @@ declare abstract class Navigator {
|
|
|
457
457
|
| string
|
|
458
458
|
| (ArrayBuffer | ArrayBufferView)
|
|
459
459
|
| Blob
|
|
460
|
+
| FormData
|
|
460
461
|
| URLSearchParams
|
|
461
|
-
|
|
|
462
|
+
| URLSearchParams,
|
|
462
463
|
): boolean;
|
|
463
464
|
readonly userAgent: string;
|
|
464
465
|
readonly gpu: GPU;
|
|
@@ -952,7 +953,7 @@ declare class Blob {
|
|
|
952
953
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
953
954
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
954
955
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
955
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
956
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
956
957
|
bytes(): Promise<Uint8Array>;
|
|
957
958
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
958
959
|
text(): Promise<string>;
|
|
@@ -1528,7 +1529,7 @@ declare abstract class Body {
|
|
|
1528
1529
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1529
1530
|
get bodyUsed(): boolean;
|
|
1530
1531
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1531
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1532
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1532
1533
|
bytes(): Promise<Uint8Array>;
|
|
1533
1534
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1534
1535
|
text(): Promise<string>;
|
|
@@ -1923,7 +1924,7 @@ declare abstract class R2Object {
|
|
|
1923
1924
|
interface R2ObjectBody extends R2Object {
|
|
1924
1925
|
get body(): ReadableStream;
|
|
1925
1926
|
get bodyUsed(): boolean;
|
|
1926
|
-
arrayBuffer(): Promise<ArrayBuffer
|
|
1927
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1927
1928
|
text(): Promise<string>;
|
|
1928
1929
|
json<T>(): Promise<T>;
|
|
1929
1930
|
blob(): Promise<Blob>;
|
|
@@ -5344,14 +5345,16 @@ declare module "cloudflare:workers" {
|
|
|
5344
5345
|
export type WorkflowSleepDuration =
|
|
5345
5346
|
| `${number} ${WorkflowDurationLabel}${"s" | ""}`
|
|
5346
5347
|
| number;
|
|
5348
|
+
export type WorkflowDelayDuration = WorkflowSleepDuration;
|
|
5349
|
+
export type WorkflowTimeoutDuration = WorkflowSleepDuration;
|
|
5347
5350
|
export type WorkflowBackoff = "constant" | "linear" | "exponential";
|
|
5348
5351
|
export type WorkflowStepConfig = {
|
|
5349
5352
|
retries?: {
|
|
5350
5353
|
limit: number;
|
|
5351
|
-
delay:
|
|
5354
|
+
delay: WorkflowDelayDuration | number;
|
|
5352
5355
|
backoff?: WorkflowBackoff;
|
|
5353
5356
|
};
|
|
5354
|
-
timeout?:
|
|
5357
|
+
timeout?: WorkflowTimeoutDuration | number;
|
|
5355
5358
|
};
|
|
5356
5359
|
export type WorkflowEvent<T> = {
|
|
5357
5360
|
payload: Readonly<T>;
|
|
@@ -5704,7 +5707,7 @@ declare module "cloudflare:workflows" {
|
|
|
5704
5707
|
public constructor(message: string, name?: string);
|
|
5705
5708
|
}
|
|
5706
5709
|
}
|
|
5707
|
-
declare abstract class Workflow {
|
|
5710
|
+
declare abstract class Workflow<PARAMS = unknown> {
|
|
5708
5711
|
/**
|
|
5709
5712
|
* Get a handle to an existing instance of the Workflow.
|
|
5710
5713
|
* @param id Id for the instance of this Workflow
|
|
@@ -5717,10 +5720,10 @@ declare abstract class Workflow {
|
|
|
5717
5720
|
* @returns A promise that resolves with a handle for the Instance
|
|
5718
5721
|
*/
|
|
5719
5722
|
public create(
|
|
5720
|
-
options?: WorkflowInstanceCreateOptions
|
|
5723
|
+
options?: WorkflowInstanceCreateOptions<PARAMS>,
|
|
5721
5724
|
): Promise<WorkflowInstance>;
|
|
5722
5725
|
}
|
|
5723
|
-
interface WorkflowInstanceCreateOptions {
|
|
5726
|
+
interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
|
|
5724
5727
|
/**
|
|
5725
5728
|
* An id for your Workflow instance. Must be unique within the Workflow.
|
|
5726
5729
|
*/
|
|
@@ -5728,7 +5731,7 @@ interface WorkflowInstanceCreateOptions {
|
|
|
5728
5731
|
/**
|
|
5729
5732
|
* The event payload the Workflow instance is triggered with
|
|
5730
5733
|
*/
|
|
5731
|
-
params?:
|
|
5734
|
+
params?: PARAMS;
|
|
5732
5735
|
}
|
|
5733
5736
|
type InstanceStatus = {
|
|
5734
5737
|
status:
|