Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions packages/common/src/activity-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ checkExtends<ActivityCancellationType, coresdk.workflow_commands.ActivityCancell
/**
* Options for remote activity invocation
*/
export interface ActivityOptions {
export type ActivityOptions = {
/**
* Identifier to use for tracking the activity in Workflow history.
* The `activityId` can be accessed by the activity function.
Expand Down Expand Up @@ -111,12 +111,20 @@ export interface ActivityOptions {
* @experimental
*/
versioningIntent?: VersioningIntent;
}
} & (
{
scheduleToCloseTimeout: Duration;
} |
{
startToCloseTimeout: Duration;
}
);


/**
* Options for local activity invocation
*/
export interface LocalActivityOptions {
export type LocalActivityOptions = {
/**
* RetryPolicy that defines how an activity is retried in case of failure. If this is not set, then the SDK-defined default activity retry policy will be used.
* Note that local activities are always executed at least once, even if maximum attempts is set to 1 due to Workflow task retries.
Expand Down Expand Up @@ -175,4 +183,11 @@ export interface LocalActivityOptions {
* - `ABANDON` - Do not request cancellation of the activity and immediately report cancellation to the workflow.
*/
cancellationType?: coresdk.workflow_commands.ActivityCancellationType;
}
} & (
{
scheduleToCloseTimeout: Duration;
} |
{
startToCloseTimeout: Duration;
}
);
Loading