@cloudflare/workers-types 4.20260425.1 → 4.20260429.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2021-11-03/index.d.ts +16 -4
- package/2021-11-03/index.ts +16 -4
- package/2022-01-31/index.d.ts +16 -4
- package/2022-01-31/index.ts +16 -4
- package/2022-03-21/index.d.ts +16 -4
- package/2022-03-21/index.ts +16 -4
- package/2022-08-04/index.d.ts +16 -4
- package/2022-08-04/index.ts +16 -4
- package/2022-10-31/index.d.ts +16 -4
- package/2022-10-31/index.ts +16 -4
- package/2022-11-30/index.d.ts +16 -4
- package/2022-11-30/index.ts +16 -4
- package/2023-03-01/index.d.ts +16 -4
- package/2023-03-01/index.ts +16 -4
- package/2023-07-01/index.d.ts +16 -4
- package/2023-07-01/index.ts +16 -4
- package/experimental/index.d.ts +20 -4
- package/experimental/index.ts +20 -4
- package/index.d.ts +16 -4
- package/index.ts +16 -4
- package/latest/index.d.ts +16 -4
- package/latest/index.ts +16 -4
- package/oldest/index.d.ts +16 -4
- package/oldest/index.ts +16 -4
- package/package.json +1 -1
package/2021-11-03/index.d.ts
CHANGED
|
@@ -2397,7 +2397,7 @@ interface R2ListOptions {
|
|
|
2397
2397
|
delimiter?: string;
|
|
2398
2398
|
startAfter?: string;
|
|
2399
2399
|
}
|
|
2400
|
-
|
|
2400
|
+
interface R2Bucket {
|
|
2401
2401
|
head(key: string): Promise<R2Object | null>;
|
|
2402
2402
|
get(
|
|
2403
2403
|
key: string,
|
|
@@ -13550,16 +13550,28 @@ declare namespace CloudflareWorkersModule {
|
|
|
13550
13550
|
attempt: number;
|
|
13551
13551
|
config: WorkflowStepConfig;
|
|
13552
13552
|
};
|
|
13553
|
+
export interface RollbackContext<T> {
|
|
13554
|
+
error: Error;
|
|
13555
|
+
output: NonNullable<T> | undefined;
|
|
13556
|
+
stepName: string;
|
|
13557
|
+
}
|
|
13558
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13559
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13560
|
+
rollback(
|
|
13561
|
+
config: WorkflowStepConfig,
|
|
13562
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13563
|
+
): StepPromise<T>;
|
|
13564
|
+
}
|
|
13553
13565
|
export abstract class WorkflowStep {
|
|
13554
13566
|
do<T extends Rpc.Serializable<T>>(
|
|
13555
13567
|
name: string,
|
|
13556
13568
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13557
|
-
):
|
|
13569
|
+
): StepPromise<T>;
|
|
13558
13570
|
do<T extends Rpc.Serializable<T>>(
|
|
13559
13571
|
name: string,
|
|
13560
13572
|
config: WorkflowStepConfig,
|
|
13561
13573
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13562
|
-
):
|
|
13574
|
+
): StepPromise<T>;
|
|
13563
13575
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13564
13576
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13565
13577
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13568,7 +13580,7 @@ declare namespace CloudflareWorkersModule {
|
|
|
13568
13580
|
type: string;
|
|
13569
13581
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13570
13582
|
},
|
|
13571
|
-
):
|
|
13583
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13572
13584
|
}
|
|
13573
13585
|
export type WorkflowInstanceStatus =
|
|
13574
13586
|
| "queued"
|
package/2021-11-03/index.ts
CHANGED
|
@@ -2400,7 +2400,7 @@ export interface R2ListOptions {
|
|
|
2400
2400
|
delimiter?: string;
|
|
2401
2401
|
startAfter?: string;
|
|
2402
2402
|
}
|
|
2403
|
-
export
|
|
2403
|
+
export interface R2Bucket {
|
|
2404
2404
|
head(key: string): Promise<R2Object | null>;
|
|
2405
2405
|
get(
|
|
2406
2406
|
key: string,
|
|
@@ -13521,16 +13521,28 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13521
13521
|
attempt: number;
|
|
13522
13522
|
config: WorkflowStepConfig;
|
|
13523
13523
|
};
|
|
13524
|
+
export interface RollbackContext<T> {
|
|
13525
|
+
error: Error;
|
|
13526
|
+
output: NonNullable<T> | undefined;
|
|
13527
|
+
stepName: string;
|
|
13528
|
+
}
|
|
13529
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13530
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13531
|
+
rollback(
|
|
13532
|
+
config: WorkflowStepConfig,
|
|
13533
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13534
|
+
): StepPromise<T>;
|
|
13535
|
+
}
|
|
13524
13536
|
export abstract class WorkflowStep {
|
|
13525
13537
|
do<T extends Rpc.Serializable<T>>(
|
|
13526
13538
|
name: string,
|
|
13527
13539
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13528
|
-
):
|
|
13540
|
+
): StepPromise<T>;
|
|
13529
13541
|
do<T extends Rpc.Serializable<T>>(
|
|
13530
13542
|
name: string,
|
|
13531
13543
|
config: WorkflowStepConfig,
|
|
13532
13544
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13533
|
-
):
|
|
13545
|
+
): StepPromise<T>;
|
|
13534
13546
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13535
13547
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13536
13548
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13539,7 +13551,7 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13539
13551
|
type: string;
|
|
13540
13552
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13541
13553
|
},
|
|
13542
|
-
):
|
|
13554
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13543
13555
|
}
|
|
13544
13556
|
export type WorkflowInstanceStatus =
|
|
13545
13557
|
| "queued"
|
package/2022-01-31/index.d.ts
CHANGED
|
@@ -2404,7 +2404,7 @@ interface R2ListOptions {
|
|
|
2404
2404
|
delimiter?: string;
|
|
2405
2405
|
startAfter?: string;
|
|
2406
2406
|
}
|
|
2407
|
-
|
|
2407
|
+
interface R2Bucket {
|
|
2408
2408
|
head(key: string): Promise<R2Object | null>;
|
|
2409
2409
|
get(
|
|
2410
2410
|
key: string,
|
|
@@ -13617,16 +13617,28 @@ declare namespace CloudflareWorkersModule {
|
|
|
13617
13617
|
attempt: number;
|
|
13618
13618
|
config: WorkflowStepConfig;
|
|
13619
13619
|
};
|
|
13620
|
+
export interface RollbackContext<T> {
|
|
13621
|
+
error: Error;
|
|
13622
|
+
output: NonNullable<T> | undefined;
|
|
13623
|
+
stepName: string;
|
|
13624
|
+
}
|
|
13625
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13626
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13627
|
+
rollback(
|
|
13628
|
+
config: WorkflowStepConfig,
|
|
13629
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13630
|
+
): StepPromise<T>;
|
|
13631
|
+
}
|
|
13620
13632
|
export abstract class WorkflowStep {
|
|
13621
13633
|
do<T extends Rpc.Serializable<T>>(
|
|
13622
13634
|
name: string,
|
|
13623
13635
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13624
|
-
):
|
|
13636
|
+
): StepPromise<T>;
|
|
13625
13637
|
do<T extends Rpc.Serializable<T>>(
|
|
13626
13638
|
name: string,
|
|
13627
13639
|
config: WorkflowStepConfig,
|
|
13628
13640
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13629
|
-
):
|
|
13641
|
+
): StepPromise<T>;
|
|
13630
13642
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13631
13643
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13632
13644
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13635,7 +13647,7 @@ declare namespace CloudflareWorkersModule {
|
|
|
13635
13647
|
type: string;
|
|
13636
13648
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13637
13649
|
},
|
|
13638
|
-
):
|
|
13650
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13639
13651
|
}
|
|
13640
13652
|
export type WorkflowInstanceStatus =
|
|
13641
13653
|
| "queued"
|
package/2022-01-31/index.ts
CHANGED
|
@@ -2407,7 +2407,7 @@ export interface R2ListOptions {
|
|
|
2407
2407
|
delimiter?: string;
|
|
2408
2408
|
startAfter?: string;
|
|
2409
2409
|
}
|
|
2410
|
-
export
|
|
2410
|
+
export interface R2Bucket {
|
|
2411
2411
|
head(key: string): Promise<R2Object | null>;
|
|
2412
2412
|
get(
|
|
2413
2413
|
key: string,
|
|
@@ -13588,16 +13588,28 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13588
13588
|
attempt: number;
|
|
13589
13589
|
config: WorkflowStepConfig;
|
|
13590
13590
|
};
|
|
13591
|
+
export interface RollbackContext<T> {
|
|
13592
|
+
error: Error;
|
|
13593
|
+
output: NonNullable<T> | undefined;
|
|
13594
|
+
stepName: string;
|
|
13595
|
+
}
|
|
13596
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13597
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13598
|
+
rollback(
|
|
13599
|
+
config: WorkflowStepConfig,
|
|
13600
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13601
|
+
): StepPromise<T>;
|
|
13602
|
+
}
|
|
13591
13603
|
export abstract class WorkflowStep {
|
|
13592
13604
|
do<T extends Rpc.Serializable<T>>(
|
|
13593
13605
|
name: string,
|
|
13594
13606
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13595
|
-
):
|
|
13607
|
+
): StepPromise<T>;
|
|
13596
13608
|
do<T extends Rpc.Serializable<T>>(
|
|
13597
13609
|
name: string,
|
|
13598
13610
|
config: WorkflowStepConfig,
|
|
13599
13611
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13600
|
-
):
|
|
13612
|
+
): StepPromise<T>;
|
|
13601
13613
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13602
13614
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13603
13615
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13606,7 +13618,7 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13606
13618
|
type: string;
|
|
13607
13619
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13608
13620
|
},
|
|
13609
|
-
):
|
|
13621
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13610
13622
|
}
|
|
13611
13623
|
export type WorkflowInstanceStatus =
|
|
13612
13624
|
| "queued"
|
package/2022-03-21/index.d.ts
CHANGED
|
@@ -2413,7 +2413,7 @@ interface R2ListOptions {
|
|
|
2413
2413
|
delimiter?: string;
|
|
2414
2414
|
startAfter?: string;
|
|
2415
2415
|
}
|
|
2416
|
-
|
|
2416
|
+
interface R2Bucket {
|
|
2417
2417
|
head(key: string): Promise<R2Object | null>;
|
|
2418
2418
|
get(
|
|
2419
2419
|
key: string,
|
|
@@ -13626,16 +13626,28 @@ declare namespace CloudflareWorkersModule {
|
|
|
13626
13626
|
attempt: number;
|
|
13627
13627
|
config: WorkflowStepConfig;
|
|
13628
13628
|
};
|
|
13629
|
+
export interface RollbackContext<T> {
|
|
13630
|
+
error: Error;
|
|
13631
|
+
output: NonNullable<T> | undefined;
|
|
13632
|
+
stepName: string;
|
|
13633
|
+
}
|
|
13634
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13635
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13636
|
+
rollback(
|
|
13637
|
+
config: WorkflowStepConfig,
|
|
13638
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13639
|
+
): StepPromise<T>;
|
|
13640
|
+
}
|
|
13629
13641
|
export abstract class WorkflowStep {
|
|
13630
13642
|
do<T extends Rpc.Serializable<T>>(
|
|
13631
13643
|
name: string,
|
|
13632
13644
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13633
|
-
):
|
|
13645
|
+
): StepPromise<T>;
|
|
13634
13646
|
do<T extends Rpc.Serializable<T>>(
|
|
13635
13647
|
name: string,
|
|
13636
13648
|
config: WorkflowStepConfig,
|
|
13637
13649
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13638
|
-
):
|
|
13650
|
+
): StepPromise<T>;
|
|
13639
13651
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13640
13652
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13641
13653
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13644,7 +13656,7 @@ declare namespace CloudflareWorkersModule {
|
|
|
13644
13656
|
type: string;
|
|
13645
13657
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13646
13658
|
},
|
|
13647
|
-
):
|
|
13659
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13648
13660
|
}
|
|
13649
13661
|
export type WorkflowInstanceStatus =
|
|
13650
13662
|
| "queued"
|
package/2022-03-21/index.ts
CHANGED
|
@@ -2416,7 +2416,7 @@ export interface R2ListOptions {
|
|
|
2416
2416
|
delimiter?: string;
|
|
2417
2417
|
startAfter?: string;
|
|
2418
2418
|
}
|
|
2419
|
-
export
|
|
2419
|
+
export interface R2Bucket {
|
|
2420
2420
|
head(key: string): Promise<R2Object | null>;
|
|
2421
2421
|
get(
|
|
2422
2422
|
key: string,
|
|
@@ -13597,16 +13597,28 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13597
13597
|
attempt: number;
|
|
13598
13598
|
config: WorkflowStepConfig;
|
|
13599
13599
|
};
|
|
13600
|
+
export interface RollbackContext<T> {
|
|
13601
|
+
error: Error;
|
|
13602
|
+
output: NonNullable<T> | undefined;
|
|
13603
|
+
stepName: string;
|
|
13604
|
+
}
|
|
13605
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13606
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13607
|
+
rollback(
|
|
13608
|
+
config: WorkflowStepConfig,
|
|
13609
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13610
|
+
): StepPromise<T>;
|
|
13611
|
+
}
|
|
13600
13612
|
export abstract class WorkflowStep {
|
|
13601
13613
|
do<T extends Rpc.Serializable<T>>(
|
|
13602
13614
|
name: string,
|
|
13603
13615
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13604
|
-
):
|
|
13616
|
+
): StepPromise<T>;
|
|
13605
13617
|
do<T extends Rpc.Serializable<T>>(
|
|
13606
13618
|
name: string,
|
|
13607
13619
|
config: WorkflowStepConfig,
|
|
13608
13620
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13609
|
-
):
|
|
13621
|
+
): StepPromise<T>;
|
|
13610
13622
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13611
13623
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13612
13624
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13615,7 +13627,7 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13615
13627
|
type: string;
|
|
13616
13628
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13617
13629
|
},
|
|
13618
|
-
):
|
|
13630
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13619
13631
|
}
|
|
13620
13632
|
export type WorkflowInstanceStatus =
|
|
13621
13633
|
| "queued"
|
package/2022-08-04/index.d.ts
CHANGED
|
@@ -2414,7 +2414,7 @@ interface R2ListOptions {
|
|
|
2414
2414
|
startAfter?: string;
|
|
2415
2415
|
include?: ("httpMetadata" | "customMetadata")[];
|
|
2416
2416
|
}
|
|
2417
|
-
|
|
2417
|
+
interface R2Bucket {
|
|
2418
2418
|
head(key: string): Promise<R2Object | null>;
|
|
2419
2419
|
get(
|
|
2420
2420
|
key: string,
|
|
@@ -13627,16 +13627,28 @@ declare namespace CloudflareWorkersModule {
|
|
|
13627
13627
|
attempt: number;
|
|
13628
13628
|
config: WorkflowStepConfig;
|
|
13629
13629
|
};
|
|
13630
|
+
export interface RollbackContext<T> {
|
|
13631
|
+
error: Error;
|
|
13632
|
+
output: NonNullable<T> | undefined;
|
|
13633
|
+
stepName: string;
|
|
13634
|
+
}
|
|
13635
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13636
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13637
|
+
rollback(
|
|
13638
|
+
config: WorkflowStepConfig,
|
|
13639
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13640
|
+
): StepPromise<T>;
|
|
13641
|
+
}
|
|
13630
13642
|
export abstract class WorkflowStep {
|
|
13631
13643
|
do<T extends Rpc.Serializable<T>>(
|
|
13632
13644
|
name: string,
|
|
13633
13645
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13634
|
-
):
|
|
13646
|
+
): StepPromise<T>;
|
|
13635
13647
|
do<T extends Rpc.Serializable<T>>(
|
|
13636
13648
|
name: string,
|
|
13637
13649
|
config: WorkflowStepConfig,
|
|
13638
13650
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13639
|
-
):
|
|
13651
|
+
): StepPromise<T>;
|
|
13640
13652
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13641
13653
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13642
13654
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13645,7 +13657,7 @@ declare namespace CloudflareWorkersModule {
|
|
|
13645
13657
|
type: string;
|
|
13646
13658
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13647
13659
|
},
|
|
13648
|
-
):
|
|
13660
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13649
13661
|
}
|
|
13650
13662
|
export type WorkflowInstanceStatus =
|
|
13651
13663
|
| "queued"
|
package/2022-08-04/index.ts
CHANGED
|
@@ -2417,7 +2417,7 @@ export interface R2ListOptions {
|
|
|
2417
2417
|
startAfter?: string;
|
|
2418
2418
|
include?: ("httpMetadata" | "customMetadata")[];
|
|
2419
2419
|
}
|
|
2420
|
-
export
|
|
2420
|
+
export interface R2Bucket {
|
|
2421
2421
|
head(key: string): Promise<R2Object | null>;
|
|
2422
2422
|
get(
|
|
2423
2423
|
key: string,
|
|
@@ -13598,16 +13598,28 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13598
13598
|
attempt: number;
|
|
13599
13599
|
config: WorkflowStepConfig;
|
|
13600
13600
|
};
|
|
13601
|
+
export interface RollbackContext<T> {
|
|
13602
|
+
error: Error;
|
|
13603
|
+
output: NonNullable<T> | undefined;
|
|
13604
|
+
stepName: string;
|
|
13605
|
+
}
|
|
13606
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13607
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13608
|
+
rollback(
|
|
13609
|
+
config: WorkflowStepConfig,
|
|
13610
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13611
|
+
): StepPromise<T>;
|
|
13612
|
+
}
|
|
13601
13613
|
export abstract class WorkflowStep {
|
|
13602
13614
|
do<T extends Rpc.Serializable<T>>(
|
|
13603
13615
|
name: string,
|
|
13604
13616
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13605
|
-
):
|
|
13617
|
+
): StepPromise<T>;
|
|
13606
13618
|
do<T extends Rpc.Serializable<T>>(
|
|
13607
13619
|
name: string,
|
|
13608
13620
|
config: WorkflowStepConfig,
|
|
13609
13621
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13610
|
-
):
|
|
13622
|
+
): StepPromise<T>;
|
|
13611
13623
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13612
13624
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13613
13625
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13616,7 +13628,7 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13616
13628
|
type: string;
|
|
13617
13629
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13618
13630
|
},
|
|
13619
|
-
):
|
|
13631
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13620
13632
|
}
|
|
13621
13633
|
export type WorkflowInstanceStatus =
|
|
13622
13634
|
| "queued"
|
package/2022-10-31/index.d.ts
CHANGED
|
@@ -2414,7 +2414,7 @@ interface R2ListOptions {
|
|
|
2414
2414
|
startAfter?: string;
|
|
2415
2415
|
include?: ("httpMetadata" | "customMetadata")[];
|
|
2416
2416
|
}
|
|
2417
|
-
|
|
2417
|
+
interface R2Bucket {
|
|
2418
2418
|
head(key: string): Promise<R2Object | null>;
|
|
2419
2419
|
get(
|
|
2420
2420
|
key: string,
|
|
@@ -13647,16 +13647,28 @@ declare namespace CloudflareWorkersModule {
|
|
|
13647
13647
|
attempt: number;
|
|
13648
13648
|
config: WorkflowStepConfig;
|
|
13649
13649
|
};
|
|
13650
|
+
export interface RollbackContext<T> {
|
|
13651
|
+
error: Error;
|
|
13652
|
+
output: NonNullable<T> | undefined;
|
|
13653
|
+
stepName: string;
|
|
13654
|
+
}
|
|
13655
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13656
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13657
|
+
rollback(
|
|
13658
|
+
config: WorkflowStepConfig,
|
|
13659
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13660
|
+
): StepPromise<T>;
|
|
13661
|
+
}
|
|
13650
13662
|
export abstract class WorkflowStep {
|
|
13651
13663
|
do<T extends Rpc.Serializable<T>>(
|
|
13652
13664
|
name: string,
|
|
13653
13665
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13654
|
-
):
|
|
13666
|
+
): StepPromise<T>;
|
|
13655
13667
|
do<T extends Rpc.Serializable<T>>(
|
|
13656
13668
|
name: string,
|
|
13657
13669
|
config: WorkflowStepConfig,
|
|
13658
13670
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13659
|
-
):
|
|
13671
|
+
): StepPromise<T>;
|
|
13660
13672
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13661
13673
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13662
13674
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13665,7 +13677,7 @@ declare namespace CloudflareWorkersModule {
|
|
|
13665
13677
|
type: string;
|
|
13666
13678
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13667
13679
|
},
|
|
13668
|
-
):
|
|
13680
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13669
13681
|
}
|
|
13670
13682
|
export type WorkflowInstanceStatus =
|
|
13671
13683
|
| "queued"
|
package/2022-10-31/index.ts
CHANGED
|
@@ -2417,7 +2417,7 @@ export interface R2ListOptions {
|
|
|
2417
2417
|
startAfter?: string;
|
|
2418
2418
|
include?: ("httpMetadata" | "customMetadata")[];
|
|
2419
2419
|
}
|
|
2420
|
-
export
|
|
2420
|
+
export interface R2Bucket {
|
|
2421
2421
|
head(key: string): Promise<R2Object | null>;
|
|
2422
2422
|
get(
|
|
2423
2423
|
key: string,
|
|
@@ -13618,16 +13618,28 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13618
13618
|
attempt: number;
|
|
13619
13619
|
config: WorkflowStepConfig;
|
|
13620
13620
|
};
|
|
13621
|
+
export interface RollbackContext<T> {
|
|
13622
|
+
error: Error;
|
|
13623
|
+
output: NonNullable<T> | undefined;
|
|
13624
|
+
stepName: string;
|
|
13625
|
+
}
|
|
13626
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13627
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13628
|
+
rollback(
|
|
13629
|
+
config: WorkflowStepConfig,
|
|
13630
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13631
|
+
): StepPromise<T>;
|
|
13632
|
+
}
|
|
13621
13633
|
export abstract class WorkflowStep {
|
|
13622
13634
|
do<T extends Rpc.Serializable<T>>(
|
|
13623
13635
|
name: string,
|
|
13624
13636
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13625
|
-
):
|
|
13637
|
+
): StepPromise<T>;
|
|
13626
13638
|
do<T extends Rpc.Serializable<T>>(
|
|
13627
13639
|
name: string,
|
|
13628
13640
|
config: WorkflowStepConfig,
|
|
13629
13641
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13630
|
-
):
|
|
13642
|
+
): StepPromise<T>;
|
|
13631
13643
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13632
13644
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13633
13645
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13636,7 +13648,7 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13636
13648
|
type: string;
|
|
13637
13649
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13638
13650
|
},
|
|
13639
|
-
):
|
|
13651
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13640
13652
|
}
|
|
13641
13653
|
export type WorkflowInstanceStatus =
|
|
13642
13654
|
| "queued"
|
package/2022-11-30/index.d.ts
CHANGED
|
@@ -2419,7 +2419,7 @@ interface R2ListOptions {
|
|
|
2419
2419
|
startAfter?: string;
|
|
2420
2420
|
include?: ("httpMetadata" | "customMetadata")[];
|
|
2421
2421
|
}
|
|
2422
|
-
|
|
2422
|
+
interface R2Bucket {
|
|
2423
2423
|
head(key: string): Promise<R2Object | null>;
|
|
2424
2424
|
get(
|
|
2425
2425
|
key: string,
|
|
@@ -13652,16 +13652,28 @@ declare namespace CloudflareWorkersModule {
|
|
|
13652
13652
|
attempt: number;
|
|
13653
13653
|
config: WorkflowStepConfig;
|
|
13654
13654
|
};
|
|
13655
|
+
export interface RollbackContext<T> {
|
|
13656
|
+
error: Error;
|
|
13657
|
+
output: NonNullable<T> | undefined;
|
|
13658
|
+
stepName: string;
|
|
13659
|
+
}
|
|
13660
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13661
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13662
|
+
rollback(
|
|
13663
|
+
config: WorkflowStepConfig,
|
|
13664
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13665
|
+
): StepPromise<T>;
|
|
13666
|
+
}
|
|
13655
13667
|
export abstract class WorkflowStep {
|
|
13656
13668
|
do<T extends Rpc.Serializable<T>>(
|
|
13657
13669
|
name: string,
|
|
13658
13670
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13659
|
-
):
|
|
13671
|
+
): StepPromise<T>;
|
|
13660
13672
|
do<T extends Rpc.Serializable<T>>(
|
|
13661
13673
|
name: string,
|
|
13662
13674
|
config: WorkflowStepConfig,
|
|
13663
13675
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13664
|
-
):
|
|
13676
|
+
): StepPromise<T>;
|
|
13665
13677
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13666
13678
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13667
13679
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13670,7 +13682,7 @@ declare namespace CloudflareWorkersModule {
|
|
|
13670
13682
|
type: string;
|
|
13671
13683
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13672
13684
|
},
|
|
13673
|
-
):
|
|
13685
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13674
13686
|
}
|
|
13675
13687
|
export type WorkflowInstanceStatus =
|
|
13676
13688
|
| "queued"
|
package/2022-11-30/index.ts
CHANGED
|
@@ -2422,7 +2422,7 @@ export interface R2ListOptions {
|
|
|
2422
2422
|
startAfter?: string;
|
|
2423
2423
|
include?: ("httpMetadata" | "customMetadata")[];
|
|
2424
2424
|
}
|
|
2425
|
-
export
|
|
2425
|
+
export interface R2Bucket {
|
|
2426
2426
|
head(key: string): Promise<R2Object | null>;
|
|
2427
2427
|
get(
|
|
2428
2428
|
key: string,
|
|
@@ -13623,16 +13623,28 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13623
13623
|
attempt: number;
|
|
13624
13624
|
config: WorkflowStepConfig;
|
|
13625
13625
|
};
|
|
13626
|
+
export interface RollbackContext<T> {
|
|
13627
|
+
error: Error;
|
|
13628
|
+
output: NonNullable<T> | undefined;
|
|
13629
|
+
stepName: string;
|
|
13630
|
+
}
|
|
13631
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13632
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13633
|
+
rollback(
|
|
13634
|
+
config: WorkflowStepConfig,
|
|
13635
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13636
|
+
): StepPromise<T>;
|
|
13637
|
+
}
|
|
13626
13638
|
export abstract class WorkflowStep {
|
|
13627
13639
|
do<T extends Rpc.Serializable<T>>(
|
|
13628
13640
|
name: string,
|
|
13629
13641
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13630
|
-
):
|
|
13642
|
+
): StepPromise<T>;
|
|
13631
13643
|
do<T extends Rpc.Serializable<T>>(
|
|
13632
13644
|
name: string,
|
|
13633
13645
|
config: WorkflowStepConfig,
|
|
13634
13646
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13635
|
-
):
|
|
13647
|
+
): StepPromise<T>;
|
|
13636
13648
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13637
13649
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13638
13650
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13641,7 +13653,7 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13641
13653
|
type: string;
|
|
13642
13654
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13643
13655
|
},
|
|
13644
|
-
):
|
|
13656
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13645
13657
|
}
|
|
13646
13658
|
export type WorkflowInstanceStatus =
|
|
13647
13659
|
| "queued"
|
package/2023-03-01/index.d.ts
CHANGED
|
@@ -2425,7 +2425,7 @@ interface R2ListOptions {
|
|
|
2425
2425
|
startAfter?: string;
|
|
2426
2426
|
include?: ("httpMetadata" | "customMetadata")[];
|
|
2427
2427
|
}
|
|
2428
|
-
|
|
2428
|
+
interface R2Bucket {
|
|
2429
2429
|
head(key: string): Promise<R2Object | null>;
|
|
2430
2430
|
get(
|
|
2431
2431
|
key: string,
|
|
@@ -13658,16 +13658,28 @@ declare namespace CloudflareWorkersModule {
|
|
|
13658
13658
|
attempt: number;
|
|
13659
13659
|
config: WorkflowStepConfig;
|
|
13660
13660
|
};
|
|
13661
|
+
export interface RollbackContext<T> {
|
|
13662
|
+
error: Error;
|
|
13663
|
+
output: NonNullable<T> | undefined;
|
|
13664
|
+
stepName: string;
|
|
13665
|
+
}
|
|
13666
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13667
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13668
|
+
rollback(
|
|
13669
|
+
config: WorkflowStepConfig,
|
|
13670
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13671
|
+
): StepPromise<T>;
|
|
13672
|
+
}
|
|
13661
13673
|
export abstract class WorkflowStep {
|
|
13662
13674
|
do<T extends Rpc.Serializable<T>>(
|
|
13663
13675
|
name: string,
|
|
13664
13676
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13665
|
-
):
|
|
13677
|
+
): StepPromise<T>;
|
|
13666
13678
|
do<T extends Rpc.Serializable<T>>(
|
|
13667
13679
|
name: string,
|
|
13668
13680
|
config: WorkflowStepConfig,
|
|
13669
13681
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13670
|
-
):
|
|
13682
|
+
): StepPromise<T>;
|
|
13671
13683
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13672
13684
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13673
13685
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13676,7 +13688,7 @@ declare namespace CloudflareWorkersModule {
|
|
|
13676
13688
|
type: string;
|
|
13677
13689
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13678
13690
|
},
|
|
13679
|
-
):
|
|
13691
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13680
13692
|
}
|
|
13681
13693
|
export type WorkflowInstanceStatus =
|
|
13682
13694
|
| "queued"
|
package/2023-03-01/index.ts
CHANGED
|
@@ -2428,7 +2428,7 @@ export interface R2ListOptions {
|
|
|
2428
2428
|
startAfter?: string;
|
|
2429
2429
|
include?: ("httpMetadata" | "customMetadata")[];
|
|
2430
2430
|
}
|
|
2431
|
-
export
|
|
2431
|
+
export interface R2Bucket {
|
|
2432
2432
|
head(key: string): Promise<R2Object | null>;
|
|
2433
2433
|
get(
|
|
2434
2434
|
key: string,
|
|
@@ -13629,16 +13629,28 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13629
13629
|
attempt: number;
|
|
13630
13630
|
config: WorkflowStepConfig;
|
|
13631
13631
|
};
|
|
13632
|
+
export interface RollbackContext<T> {
|
|
13633
|
+
error: Error;
|
|
13634
|
+
output: NonNullable<T> | undefined;
|
|
13635
|
+
stepName: string;
|
|
13636
|
+
}
|
|
13637
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13638
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13639
|
+
rollback(
|
|
13640
|
+
config: WorkflowStepConfig,
|
|
13641
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13642
|
+
): StepPromise<T>;
|
|
13643
|
+
}
|
|
13632
13644
|
export abstract class WorkflowStep {
|
|
13633
13645
|
do<T extends Rpc.Serializable<T>>(
|
|
13634
13646
|
name: string,
|
|
13635
13647
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13636
|
-
):
|
|
13648
|
+
): StepPromise<T>;
|
|
13637
13649
|
do<T extends Rpc.Serializable<T>>(
|
|
13638
13650
|
name: string,
|
|
13639
13651
|
config: WorkflowStepConfig,
|
|
13640
13652
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13641
|
-
):
|
|
13653
|
+
): StepPromise<T>;
|
|
13642
13654
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13643
13655
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13644
13656
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13647,7 +13659,7 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13647
13659
|
type: string;
|
|
13648
13660
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13649
13661
|
},
|
|
13650
|
-
):
|
|
13662
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13651
13663
|
}
|
|
13652
13664
|
export type WorkflowInstanceStatus =
|
|
13653
13665
|
| "queued"
|
package/2023-07-01/index.d.ts
CHANGED
|
@@ -2425,7 +2425,7 @@ interface R2ListOptions {
|
|
|
2425
2425
|
startAfter?: string;
|
|
2426
2426
|
include?: ("httpMetadata" | "customMetadata")[];
|
|
2427
2427
|
}
|
|
2428
|
-
|
|
2428
|
+
interface R2Bucket {
|
|
2429
2429
|
head(key: string): Promise<R2Object | null>;
|
|
2430
2430
|
get(
|
|
2431
2431
|
key: string,
|
|
@@ -13658,16 +13658,28 @@ declare namespace CloudflareWorkersModule {
|
|
|
13658
13658
|
attempt: number;
|
|
13659
13659
|
config: WorkflowStepConfig;
|
|
13660
13660
|
};
|
|
13661
|
+
export interface RollbackContext<T> {
|
|
13662
|
+
error: Error;
|
|
13663
|
+
output: NonNullable<T> | undefined;
|
|
13664
|
+
stepName: string;
|
|
13665
|
+
}
|
|
13666
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13667
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13668
|
+
rollback(
|
|
13669
|
+
config: WorkflowStepConfig,
|
|
13670
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13671
|
+
): StepPromise<T>;
|
|
13672
|
+
}
|
|
13661
13673
|
export abstract class WorkflowStep {
|
|
13662
13674
|
do<T extends Rpc.Serializable<T>>(
|
|
13663
13675
|
name: string,
|
|
13664
13676
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13665
|
-
):
|
|
13677
|
+
): StepPromise<T>;
|
|
13666
13678
|
do<T extends Rpc.Serializable<T>>(
|
|
13667
13679
|
name: string,
|
|
13668
13680
|
config: WorkflowStepConfig,
|
|
13669
13681
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13670
|
-
):
|
|
13682
|
+
): StepPromise<T>;
|
|
13671
13683
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13672
13684
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13673
13685
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13676,7 +13688,7 @@ declare namespace CloudflareWorkersModule {
|
|
|
13676
13688
|
type: string;
|
|
13677
13689
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13678
13690
|
},
|
|
13679
|
-
):
|
|
13691
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13680
13692
|
}
|
|
13681
13693
|
export type WorkflowInstanceStatus =
|
|
13682
13694
|
| "queued"
|
package/2023-07-01/index.ts
CHANGED
|
@@ -2428,7 +2428,7 @@ export interface R2ListOptions {
|
|
|
2428
2428
|
startAfter?: string;
|
|
2429
2429
|
include?: ("httpMetadata" | "customMetadata")[];
|
|
2430
2430
|
}
|
|
2431
|
-
export
|
|
2431
|
+
export interface R2Bucket {
|
|
2432
2432
|
head(key: string): Promise<R2Object | null>;
|
|
2433
2433
|
get(
|
|
2434
2434
|
key: string,
|
|
@@ -13629,16 +13629,28 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13629
13629
|
attempt: number;
|
|
13630
13630
|
config: WorkflowStepConfig;
|
|
13631
13631
|
};
|
|
13632
|
+
export interface RollbackContext<T> {
|
|
13633
|
+
error: Error;
|
|
13634
|
+
output: NonNullable<T> | undefined;
|
|
13635
|
+
stepName: string;
|
|
13636
|
+
}
|
|
13637
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13638
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13639
|
+
rollback(
|
|
13640
|
+
config: WorkflowStepConfig,
|
|
13641
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13642
|
+
): StepPromise<T>;
|
|
13643
|
+
}
|
|
13632
13644
|
export abstract class WorkflowStep {
|
|
13633
13645
|
do<T extends Rpc.Serializable<T>>(
|
|
13634
13646
|
name: string,
|
|
13635
13647
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13636
|
-
):
|
|
13648
|
+
): StepPromise<T>;
|
|
13637
13649
|
do<T extends Rpc.Serializable<T>>(
|
|
13638
13650
|
name: string,
|
|
13639
13651
|
config: WorkflowStepConfig,
|
|
13640
13652
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13641
|
-
):
|
|
13653
|
+
): StepPromise<T>;
|
|
13642
13654
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13643
13655
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13644
13656
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13647,7 +13659,7 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13647
13659
|
type: string;
|
|
13648
13660
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13649
13661
|
},
|
|
13650
|
-
):
|
|
13662
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13651
13663
|
}
|
|
13652
13664
|
export type WorkflowInstanceStatus =
|
|
13653
13665
|
| "queued"
|
package/experimental/index.d.ts
CHANGED
|
@@ -2530,7 +2530,7 @@ interface R2ListOptions {
|
|
|
2530
2530
|
startAfter?: string;
|
|
2531
2531
|
include?: ("httpMetadata" | "customMetadata")[];
|
|
2532
2532
|
}
|
|
2533
|
-
|
|
2533
|
+
interface R2Bucket {
|
|
2534
2534
|
head(key: string): Promise<R2Object | null>;
|
|
2535
2535
|
get(
|
|
2536
2536
|
key: string,
|
|
@@ -4003,6 +4003,7 @@ interface Container {
|
|
|
4003
4003
|
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
4004
4004
|
exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
|
|
4005
4005
|
interceptOutboundTcp(addr: string, binding: Fetcher): Promise<void>;
|
|
4006
|
+
inspect(): Promise<ContainerInfo | null>;
|
|
4006
4007
|
}
|
|
4007
4008
|
interface ContainerDirectorySnapshot {
|
|
4008
4009
|
id: string;
|
|
@@ -4035,6 +4036,9 @@ interface ContainerStartupOptions {
|
|
|
4035
4036
|
directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
|
|
4036
4037
|
containerSnapshot?: ContainerSnapshot;
|
|
4037
4038
|
}
|
|
4039
|
+
interface ContainerInfo {
|
|
4040
|
+
labels: Record<string, string>;
|
|
4041
|
+
}
|
|
4038
4042
|
/**
|
|
4039
4043
|
* The **`FileSystemHandle`** interface of the File System API is an object which represents a file or directory entry.
|
|
4040
4044
|
* Available only in secure contexts.
|
|
@@ -14355,16 +14359,28 @@ declare namespace CloudflareWorkersModule {
|
|
|
14355
14359
|
attempt: number;
|
|
14356
14360
|
config: WorkflowStepConfig;
|
|
14357
14361
|
};
|
|
14362
|
+
export interface RollbackContext<T> {
|
|
14363
|
+
error: Error;
|
|
14364
|
+
output: NonNullable<T> | undefined;
|
|
14365
|
+
stepName: string;
|
|
14366
|
+
}
|
|
14367
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
14368
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
14369
|
+
rollback(
|
|
14370
|
+
config: WorkflowStepConfig,
|
|
14371
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
14372
|
+
): StepPromise<T>;
|
|
14373
|
+
}
|
|
14358
14374
|
export abstract class WorkflowStep {
|
|
14359
14375
|
do<T extends Rpc.Serializable<T>>(
|
|
14360
14376
|
name: string,
|
|
14361
14377
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
14362
|
-
):
|
|
14378
|
+
): StepPromise<T>;
|
|
14363
14379
|
do<T extends Rpc.Serializable<T>>(
|
|
14364
14380
|
name: string,
|
|
14365
14381
|
config: WorkflowStepConfig,
|
|
14366
14382
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
14367
|
-
):
|
|
14383
|
+
): StepPromise<T>;
|
|
14368
14384
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
14369
14385
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
14370
14386
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -14373,7 +14389,7 @@ declare namespace CloudflareWorkersModule {
|
|
|
14373
14389
|
type: string;
|
|
14374
14390
|
timeout?: WorkflowTimeoutDuration | number;
|
|
14375
14391
|
},
|
|
14376
|
-
):
|
|
14392
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
14377
14393
|
}
|
|
14378
14394
|
export type WorkflowInstanceStatus =
|
|
14379
14395
|
| "queued"
|
package/experimental/index.ts
CHANGED
|
@@ -2533,7 +2533,7 @@ export interface R2ListOptions {
|
|
|
2533
2533
|
startAfter?: string;
|
|
2534
2534
|
include?: ("httpMetadata" | "customMetadata")[];
|
|
2535
2535
|
}
|
|
2536
|
-
export
|
|
2536
|
+
export interface R2Bucket {
|
|
2537
2537
|
head(key: string): Promise<R2Object | null>;
|
|
2538
2538
|
get(
|
|
2539
2539
|
key: string,
|
|
@@ -4009,6 +4009,7 @@ export interface Container {
|
|
|
4009
4009
|
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
4010
4010
|
exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
|
|
4011
4011
|
interceptOutboundTcp(addr: string, binding: Fetcher): Promise<void>;
|
|
4012
|
+
inspect(): Promise<ContainerInfo | null>;
|
|
4012
4013
|
}
|
|
4013
4014
|
export interface ContainerDirectorySnapshot {
|
|
4014
4015
|
id: string;
|
|
@@ -4041,6 +4042,9 @@ export interface ContainerStartupOptions {
|
|
|
4041
4042
|
directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
|
|
4042
4043
|
containerSnapshot?: ContainerSnapshot;
|
|
4043
4044
|
}
|
|
4045
|
+
export interface ContainerInfo {
|
|
4046
|
+
labels: Record<string, string>;
|
|
4047
|
+
}
|
|
4044
4048
|
/**
|
|
4045
4049
|
* The **`FileSystemHandle`** interface of the File System API is an object which represents a file or directory entry.
|
|
4046
4050
|
* Available only in secure contexts.
|
|
@@ -14326,16 +14330,28 @@ export declare namespace CloudflareWorkersModule {
|
|
|
14326
14330
|
attempt: number;
|
|
14327
14331
|
config: WorkflowStepConfig;
|
|
14328
14332
|
};
|
|
14333
|
+
export interface RollbackContext<T> {
|
|
14334
|
+
error: Error;
|
|
14335
|
+
output: NonNullable<T> | undefined;
|
|
14336
|
+
stepName: string;
|
|
14337
|
+
}
|
|
14338
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
14339
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
14340
|
+
rollback(
|
|
14341
|
+
config: WorkflowStepConfig,
|
|
14342
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
14343
|
+
): StepPromise<T>;
|
|
14344
|
+
}
|
|
14329
14345
|
export abstract class WorkflowStep {
|
|
14330
14346
|
do<T extends Rpc.Serializable<T>>(
|
|
14331
14347
|
name: string,
|
|
14332
14348
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
14333
|
-
):
|
|
14349
|
+
): StepPromise<T>;
|
|
14334
14350
|
do<T extends Rpc.Serializable<T>>(
|
|
14335
14351
|
name: string,
|
|
14336
14352
|
config: WorkflowStepConfig,
|
|
14337
14353
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
14338
|
-
):
|
|
14354
|
+
): StepPromise<T>;
|
|
14339
14355
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
14340
14356
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
14341
14357
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -14344,7 +14360,7 @@ export declare namespace CloudflareWorkersModule {
|
|
|
14344
14360
|
type: string;
|
|
14345
14361
|
timeout?: WorkflowTimeoutDuration | number;
|
|
14346
14362
|
},
|
|
14347
|
-
):
|
|
14363
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
14348
14364
|
}
|
|
14349
14365
|
export type WorkflowInstanceStatus =
|
|
14350
14366
|
| "queued"
|
package/index.d.ts
CHANGED
|
@@ -2397,7 +2397,7 @@ interface R2ListOptions {
|
|
|
2397
2397
|
delimiter?: string;
|
|
2398
2398
|
startAfter?: string;
|
|
2399
2399
|
}
|
|
2400
|
-
|
|
2400
|
+
interface R2Bucket {
|
|
2401
2401
|
head(key: string): Promise<R2Object | null>;
|
|
2402
2402
|
get(
|
|
2403
2403
|
key: string,
|
|
@@ -13550,16 +13550,28 @@ declare namespace CloudflareWorkersModule {
|
|
|
13550
13550
|
attempt: number;
|
|
13551
13551
|
config: WorkflowStepConfig;
|
|
13552
13552
|
};
|
|
13553
|
+
export interface RollbackContext<T> {
|
|
13554
|
+
error: Error;
|
|
13555
|
+
output: NonNullable<T> | undefined;
|
|
13556
|
+
stepName: string;
|
|
13557
|
+
}
|
|
13558
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13559
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13560
|
+
rollback(
|
|
13561
|
+
config: WorkflowStepConfig,
|
|
13562
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13563
|
+
): StepPromise<T>;
|
|
13564
|
+
}
|
|
13553
13565
|
export abstract class WorkflowStep {
|
|
13554
13566
|
do<T extends Rpc.Serializable<T>>(
|
|
13555
13567
|
name: string,
|
|
13556
13568
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13557
|
-
):
|
|
13569
|
+
): StepPromise<T>;
|
|
13558
13570
|
do<T extends Rpc.Serializable<T>>(
|
|
13559
13571
|
name: string,
|
|
13560
13572
|
config: WorkflowStepConfig,
|
|
13561
13573
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13562
|
-
):
|
|
13574
|
+
): StepPromise<T>;
|
|
13563
13575
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13564
13576
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13565
13577
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13568,7 +13580,7 @@ declare namespace CloudflareWorkersModule {
|
|
|
13568
13580
|
type: string;
|
|
13569
13581
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13570
13582
|
},
|
|
13571
|
-
):
|
|
13583
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13572
13584
|
}
|
|
13573
13585
|
export type WorkflowInstanceStatus =
|
|
13574
13586
|
| "queued"
|
package/index.ts
CHANGED
|
@@ -2400,7 +2400,7 @@ export interface R2ListOptions {
|
|
|
2400
2400
|
delimiter?: string;
|
|
2401
2401
|
startAfter?: string;
|
|
2402
2402
|
}
|
|
2403
|
-
export
|
|
2403
|
+
export interface R2Bucket {
|
|
2404
2404
|
head(key: string): Promise<R2Object | null>;
|
|
2405
2405
|
get(
|
|
2406
2406
|
key: string,
|
|
@@ -13521,16 +13521,28 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13521
13521
|
attempt: number;
|
|
13522
13522
|
config: WorkflowStepConfig;
|
|
13523
13523
|
};
|
|
13524
|
+
export interface RollbackContext<T> {
|
|
13525
|
+
error: Error;
|
|
13526
|
+
output: NonNullable<T> | undefined;
|
|
13527
|
+
stepName: string;
|
|
13528
|
+
}
|
|
13529
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13530
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13531
|
+
rollback(
|
|
13532
|
+
config: WorkflowStepConfig,
|
|
13533
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13534
|
+
): StepPromise<T>;
|
|
13535
|
+
}
|
|
13524
13536
|
export abstract class WorkflowStep {
|
|
13525
13537
|
do<T extends Rpc.Serializable<T>>(
|
|
13526
13538
|
name: string,
|
|
13527
13539
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13528
|
-
):
|
|
13540
|
+
): StepPromise<T>;
|
|
13529
13541
|
do<T extends Rpc.Serializable<T>>(
|
|
13530
13542
|
name: string,
|
|
13531
13543
|
config: WorkflowStepConfig,
|
|
13532
13544
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13533
|
-
):
|
|
13545
|
+
): StepPromise<T>;
|
|
13534
13546
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13535
13547
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13536
13548
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13539,7 +13551,7 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13539
13551
|
type: string;
|
|
13540
13552
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13541
13553
|
},
|
|
13542
|
-
):
|
|
13554
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13543
13555
|
}
|
|
13544
13556
|
export type WorkflowInstanceStatus =
|
|
13545
13557
|
| "queued"
|
package/latest/index.d.ts
CHANGED
|
@@ -2437,7 +2437,7 @@ interface R2ListOptions {
|
|
|
2437
2437
|
startAfter?: string;
|
|
2438
2438
|
include?: ("httpMetadata" | "customMetadata")[];
|
|
2439
2439
|
}
|
|
2440
|
-
|
|
2440
|
+
interface R2Bucket {
|
|
2441
2441
|
head(key: string): Promise<R2Object | null>;
|
|
2442
2442
|
get(
|
|
2443
2443
|
key: string,
|
|
@@ -13691,16 +13691,28 @@ declare namespace CloudflareWorkersModule {
|
|
|
13691
13691
|
attempt: number;
|
|
13692
13692
|
config: WorkflowStepConfig;
|
|
13693
13693
|
};
|
|
13694
|
+
export interface RollbackContext<T> {
|
|
13695
|
+
error: Error;
|
|
13696
|
+
output: NonNullable<T> | undefined;
|
|
13697
|
+
stepName: string;
|
|
13698
|
+
}
|
|
13699
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13700
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13701
|
+
rollback(
|
|
13702
|
+
config: WorkflowStepConfig,
|
|
13703
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13704
|
+
): StepPromise<T>;
|
|
13705
|
+
}
|
|
13694
13706
|
export abstract class WorkflowStep {
|
|
13695
13707
|
do<T extends Rpc.Serializable<T>>(
|
|
13696
13708
|
name: string,
|
|
13697
13709
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13698
|
-
):
|
|
13710
|
+
): StepPromise<T>;
|
|
13699
13711
|
do<T extends Rpc.Serializable<T>>(
|
|
13700
13712
|
name: string,
|
|
13701
13713
|
config: WorkflowStepConfig,
|
|
13702
13714
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13703
|
-
):
|
|
13715
|
+
): StepPromise<T>;
|
|
13704
13716
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13705
13717
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13706
13718
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13709,7 +13721,7 @@ declare namespace CloudflareWorkersModule {
|
|
|
13709
13721
|
type: string;
|
|
13710
13722
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13711
13723
|
},
|
|
13712
|
-
):
|
|
13724
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13713
13725
|
}
|
|
13714
13726
|
export type WorkflowInstanceStatus =
|
|
13715
13727
|
| "queued"
|
package/latest/index.ts
CHANGED
|
@@ -2440,7 +2440,7 @@ export interface R2ListOptions {
|
|
|
2440
2440
|
startAfter?: string;
|
|
2441
2441
|
include?: ("httpMetadata" | "customMetadata")[];
|
|
2442
2442
|
}
|
|
2443
|
-
export
|
|
2443
|
+
export interface R2Bucket {
|
|
2444
2444
|
head(key: string): Promise<R2Object | null>;
|
|
2445
2445
|
get(
|
|
2446
2446
|
key: string,
|
|
@@ -13662,16 +13662,28 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13662
13662
|
attempt: number;
|
|
13663
13663
|
config: WorkflowStepConfig;
|
|
13664
13664
|
};
|
|
13665
|
+
export interface RollbackContext<T> {
|
|
13666
|
+
error: Error;
|
|
13667
|
+
output: NonNullable<T> | undefined;
|
|
13668
|
+
stepName: string;
|
|
13669
|
+
}
|
|
13670
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13671
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13672
|
+
rollback(
|
|
13673
|
+
config: WorkflowStepConfig,
|
|
13674
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13675
|
+
): StepPromise<T>;
|
|
13676
|
+
}
|
|
13665
13677
|
export abstract class WorkflowStep {
|
|
13666
13678
|
do<T extends Rpc.Serializable<T>>(
|
|
13667
13679
|
name: string,
|
|
13668
13680
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13669
|
-
):
|
|
13681
|
+
): StepPromise<T>;
|
|
13670
13682
|
do<T extends Rpc.Serializable<T>>(
|
|
13671
13683
|
name: string,
|
|
13672
13684
|
config: WorkflowStepConfig,
|
|
13673
13685
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13674
|
-
):
|
|
13686
|
+
): StepPromise<T>;
|
|
13675
13687
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13676
13688
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13677
13689
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13680,7 +13692,7 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13680
13692
|
type: string;
|
|
13681
13693
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13682
13694
|
},
|
|
13683
|
-
):
|
|
13695
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13684
13696
|
}
|
|
13685
13697
|
export type WorkflowInstanceStatus =
|
|
13686
13698
|
| "queued"
|
package/oldest/index.d.ts
CHANGED
|
@@ -2397,7 +2397,7 @@ interface R2ListOptions {
|
|
|
2397
2397
|
delimiter?: string;
|
|
2398
2398
|
startAfter?: string;
|
|
2399
2399
|
}
|
|
2400
|
-
|
|
2400
|
+
interface R2Bucket {
|
|
2401
2401
|
head(key: string): Promise<R2Object | null>;
|
|
2402
2402
|
get(
|
|
2403
2403
|
key: string,
|
|
@@ -13550,16 +13550,28 @@ declare namespace CloudflareWorkersModule {
|
|
|
13550
13550
|
attempt: number;
|
|
13551
13551
|
config: WorkflowStepConfig;
|
|
13552
13552
|
};
|
|
13553
|
+
export interface RollbackContext<T> {
|
|
13554
|
+
error: Error;
|
|
13555
|
+
output: NonNullable<T> | undefined;
|
|
13556
|
+
stepName: string;
|
|
13557
|
+
}
|
|
13558
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13559
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13560
|
+
rollback(
|
|
13561
|
+
config: WorkflowStepConfig,
|
|
13562
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13563
|
+
): StepPromise<T>;
|
|
13564
|
+
}
|
|
13553
13565
|
export abstract class WorkflowStep {
|
|
13554
13566
|
do<T extends Rpc.Serializable<T>>(
|
|
13555
13567
|
name: string,
|
|
13556
13568
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13557
|
-
):
|
|
13569
|
+
): StepPromise<T>;
|
|
13558
13570
|
do<T extends Rpc.Serializable<T>>(
|
|
13559
13571
|
name: string,
|
|
13560
13572
|
config: WorkflowStepConfig,
|
|
13561
13573
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13562
|
-
):
|
|
13574
|
+
): StepPromise<T>;
|
|
13563
13575
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13564
13576
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13565
13577
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13568,7 +13580,7 @@ declare namespace CloudflareWorkersModule {
|
|
|
13568
13580
|
type: string;
|
|
13569
13581
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13570
13582
|
},
|
|
13571
|
-
):
|
|
13583
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13572
13584
|
}
|
|
13573
13585
|
export type WorkflowInstanceStatus =
|
|
13574
13586
|
| "queued"
|
package/oldest/index.ts
CHANGED
|
@@ -2400,7 +2400,7 @@ export interface R2ListOptions {
|
|
|
2400
2400
|
delimiter?: string;
|
|
2401
2401
|
startAfter?: string;
|
|
2402
2402
|
}
|
|
2403
|
-
export
|
|
2403
|
+
export interface R2Bucket {
|
|
2404
2404
|
head(key: string): Promise<R2Object | null>;
|
|
2405
2405
|
get(
|
|
2406
2406
|
key: string,
|
|
@@ -13521,16 +13521,28 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13521
13521
|
attempt: number;
|
|
13522
13522
|
config: WorkflowStepConfig;
|
|
13523
13523
|
};
|
|
13524
|
+
export interface RollbackContext<T> {
|
|
13525
|
+
error: Error;
|
|
13526
|
+
output: NonNullable<T> | undefined;
|
|
13527
|
+
stepName: string;
|
|
13528
|
+
}
|
|
13529
|
+
export interface StepPromise<T> extends Promise<T> {
|
|
13530
|
+
rollback(fn: (ctx: RollbackContext<T>) => Promise<void>): StepPromise<T>;
|
|
13531
|
+
rollback(
|
|
13532
|
+
config: WorkflowStepConfig,
|
|
13533
|
+
fn: (ctx: RollbackContext<T>) => Promise<void>,
|
|
13534
|
+
): StepPromise<T>;
|
|
13535
|
+
}
|
|
13524
13536
|
export abstract class WorkflowStep {
|
|
13525
13537
|
do<T extends Rpc.Serializable<T>>(
|
|
13526
13538
|
name: string,
|
|
13527
13539
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13528
|
-
):
|
|
13540
|
+
): StepPromise<T>;
|
|
13529
13541
|
do<T extends Rpc.Serializable<T>>(
|
|
13530
13542
|
name: string,
|
|
13531
13543
|
config: WorkflowStepConfig,
|
|
13532
13544
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13533
|
-
):
|
|
13545
|
+
): StepPromise<T>;
|
|
13534
13546
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13535
13547
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13536
13548
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13539,7 +13551,7 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13539
13551
|
type: string;
|
|
13540
13552
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13541
13553
|
},
|
|
13542
|
-
):
|
|
13554
|
+
): StepPromise<WorkflowStepEvent<T>>;
|
|
13543
13555
|
}
|
|
13544
13556
|
export type WorkflowInstanceStatus =
|
|
13545
13557
|
| "queued"
|
package/package.json
CHANGED