@workers-community/workers-types 4.20260505.1 → 4.20260507.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/index.d.ts +3 -15
- package/index.ts +3 -15
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -13658,28 +13658,16 @@ 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
|
-
}
|
|
13673
13661
|
export abstract class WorkflowStep {
|
|
13674
13662
|
do<T extends Rpc.Serializable<T>>(
|
|
13675
13663
|
name: string,
|
|
13676
13664
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13677
|
-
):
|
|
13665
|
+
): Promise<T>;
|
|
13678
13666
|
do<T extends Rpc.Serializable<T>>(
|
|
13679
13667
|
name: string,
|
|
13680
13668
|
config: WorkflowStepConfig,
|
|
13681
13669
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13682
|
-
):
|
|
13670
|
+
): Promise<T>;
|
|
13683
13671
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13684
13672
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13685
13673
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13688,7 +13676,7 @@ declare namespace CloudflareWorkersModule {
|
|
|
13688
13676
|
type: string;
|
|
13689
13677
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13690
13678
|
},
|
|
13691
|
-
):
|
|
13679
|
+
): Promise<WorkflowStepEvent<T>>;
|
|
13692
13680
|
}
|
|
13693
13681
|
export type WorkflowInstanceStatus =
|
|
13694
13682
|
| "queued"
|
package/index.ts
CHANGED
|
@@ -13629,28 +13629,16 @@ 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
|
-
}
|
|
13644
13632
|
export abstract class WorkflowStep {
|
|
13645
13633
|
do<T extends Rpc.Serializable<T>>(
|
|
13646
13634
|
name: string,
|
|
13647
13635
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13648
|
-
):
|
|
13636
|
+
): Promise<T>;
|
|
13649
13637
|
do<T extends Rpc.Serializable<T>>(
|
|
13650
13638
|
name: string,
|
|
13651
13639
|
config: WorkflowStepConfig,
|
|
13652
13640
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
13653
|
-
):
|
|
13641
|
+
): Promise<T>;
|
|
13654
13642
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
13655
13643
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
13656
13644
|
waitForEvent<T extends Rpc.Serializable<T>>(
|
|
@@ -13659,7 +13647,7 @@ export declare namespace CloudflareWorkersModule {
|
|
|
13659
13647
|
type: string;
|
|
13660
13648
|
timeout?: WorkflowTimeoutDuration | number;
|
|
13661
13649
|
},
|
|
13662
|
-
):
|
|
13650
|
+
): Promise<WorkflowStepEvent<T>>;
|
|
13663
13651
|
}
|
|
13664
13652
|
export type WorkflowInstanceStatus =
|
|
13665
13653
|
| "queued"
|