Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eventual/core

Package Overview
Dependencies
Maintainers
2
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eventual/core - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

62

lib/cjs/activity.d.ts

@@ -1,2 +0,2 @@

import { SendActivitySuccessRequest } from "./service-client.js";
import { SendActivityFailureRequest, SendActivityHeartbeatRequest, SendActivityHeartbeatResponse, SendActivitySuccessRequest } from "./service-client.js";
export interface ActivityOptions {

@@ -15,3 +15,3 @@ /**

* When set to a positive number, the activity must call {@link heartbeat} or
* {@link WorkflowClient.heartbeatActivity} at least every heartbeatSeconds.
* {@link EventualServiceClient.sendActivityHeartbeat} at least every heartbeatSeconds.
*

@@ -34,7 +34,7 @@ * If it fails to do so, the workflow will cancel the activity and throw an error.

* const asyncActivity = activity("async", () => {
* return asyncResult<string>(token => tokenEvent.publish({ token }));
* return asyncResult<string>(token => tokenEvent.publishEvents({ token }));
* });
*
* tokenEvent.on(async ({token}) => {
* await asyncActivity.complete({
* tokenEvent.onEvent(async ({token}) => {
* await asyncActivity.sendActivitySuccess({
* activityToken: token,

@@ -46,3 +46,47 @@ * result: "done"

*/
complete(request: Omit<SendActivitySuccessRequest<UnwrapAsync<Awaited<Output>>>, "type">): Promise<void>;
sendActivitySuccess(request: Omit<SendActivitySuccessRequest<Awaited<UnwrapAsync<Output>>>, "type">): Promise<void>;
/**
* Fail an activity request by its {@link SendActivityFailureRequest.activityToken}.
*
* This method is used in conjunction with {@link asyncResult} in an activity
* to perform asynchronous, long-running computations. For example:
*
* ```ts
* const tokenEvent = event("token");
*
* const asyncActivity = activity("async", () => {
* return asyncResult<string>(token => tokenEvent.publishEvents({ token }));
* });
*
* tokenEvent.onEvent(async ({token}) => {
* await asyncActivity.sendActivityFailure({
* activityToken: token,
* error: "MyError",
* message: "Something went wrong"
* });
* })
* ```
*/
sendActivityFailure(request: Omit<SendActivityFailureRequest, "type">): Promise<void>;
/**
* Heartbeat an activity request by its {@link SendActivityHeartbeatRequest.activityToken}.
*
* This method is used in conjunction with {@link asyncResult} in an activity
* to perform asynchronous, long-running computations. For example:
*
* ```ts
* const tokenEvent = event("token");
*
* const asyncActivity = activity("async", () => {
* return asyncResult<string>(token => tokenEvent.publishEvents({ token }));
* });
*
* tokenEvent.onEvent(async ({token}) => {
* await asyncActivity.sendActivityFailure({
* activityToken: token
* });
* })
* ```
*/
sendActivityHeartbeat(request: Omit<SendActivityHeartbeatRequest, "type">): Promise<SendActivityHeartbeatResponse>;
activityID: string;

@@ -68,3 +112,3 @@ }

* activity async. This allows the activity to defer sending a response from the
* current function and instead complete the activity with {@link WorkflowClient.completeActivity}.
* current function and instead complete the activity with {@link WorkflowClient.sendActivitySuccess}.
*

@@ -74,3 +118,3 @@ * ```ts

* activity("myActivity", () => {
* // tells the system that the completeActivity function will be called later with a string result.
* // tells the system that the sendActivitySuccess function will be called later with a string result.
* return asyncResult<string>(async (activityToken) => {

@@ -85,3 +129,3 @@ * // before exiting, send the activityToken to a sqs queue to be completed later

* @param tokenContext is a callback which provides the activityToken. The activity token is used
* to completeActivity and heartbeatActivity from outside of the
* to sendActivitySuccess and sendActivityHeartbeat from outside of the
* activity.

@@ -88,0 +132,0 @@ */

16

lib/cjs/activity.js

@@ -15,3 +15,3 @@ "use strict";

* activity async. This allows the activity to defer sending a response from the
* current function and instead complete the activity with {@link WorkflowClient.completeActivity}.
* current function and instead complete the activity with {@link WorkflowClient.sendActivitySuccess}.
*

@@ -21,3 +21,3 @@ * ```ts

* activity("myActivity", () => {
* // tells the system that the completeActivity function will be called later with a string result.
* // tells the system that the sendActivitySuccess function will be called later with a string result.
* return asyncResult<string>(async (activityToken) => {

@@ -32,3 +32,3 @@ * // before exiting, send the activityToken to a sqs queue to be completed later

* @param tokenContext is a callback which provides the activityToken. The activity token is used
* to completeActivity and heartbeatActivity from outside of the
* to sendActivitySuccess and sendActivityHeartbeat from outside of the
* activity.

@@ -64,5 +64,11 @@ */

});
func.complete = async function (request) {
func.sendActivitySuccess = async function (request) {
return (0, global_js_1.getServiceClient)().sendActivitySuccess(request);
};
func.sendActivityFailure = async function (request) {
return (0, global_js_1.getServiceClient)().sendActivityFailure(request);
};
func.sendActivityHeartbeat = async function (request) {
return (0, global_js_1.getServiceClient)().sendActivityHeartbeat(request);
};
func.activityID = activityID;

@@ -83,2 +89,2 @@ return func;

exports.getCallableActivityNames = getCallableActivityNames;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aXZpdHkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYWN0aXZpdHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsK0RBQThEO0FBQzlELDJDQUlxQjtBQUNyQixpREFBNEU7QUEyRTVFLE1BQU0sZ0JBQWdCLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQyxxQkFBcUIsQ0FBQyxDQUFDO0FBVTNELFNBQWdCLGFBQWEsQ0FBQyxHQUFRO0lBQ3BDLE9BQU8sQ0FBQyxDQUFDLEdBQUcsSUFBSSxHQUFHLENBQUMsZ0JBQWdCLENBQUMsS0FBSyxnQkFBZ0IsQ0FBQztBQUM3RCxDQUFDO0FBRkQsc0NBRUM7QUFFRDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FvQkc7QUFDSSxLQUFLLFVBQVUsV0FBVyxDQUMvQixZQUFxRDtJQUVyRCxJQUFJLENBQUMsSUFBQSwyQkFBZ0IsR0FBRSxFQUFFO1FBQ3ZCLE1BQU0sSUFBSSxLQUFLLENBQUMseURBQXlELENBQUMsQ0FBQztLQUM1RTtJQUNELE1BQU0sZUFBZSxHQUFHLElBQUEsOEJBQWtCLEdBQUUsQ0FBQztJQUM3QyxJQUFJLENBQUMsZUFBZSxFQUFFO1FBQ3BCLE1BQ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mdW5jdGlvbiAocmVxdWVzdCkge1xuICAgIHJldHVybiBnZXRTZXJ2aWNlQ2xpZW50KCkuc2VuZEFjdGl2aXR5RmFpbHVyZShyZXF1ZXN0KTtcbiAgfTtcbiAgZnVuYy5zZW5kQWN0aXZpdHlIZWFydGJlYXQgPSBhc3luYyBmdW5jdGlvbiAocmVxdWVzdCkge1xuICAgIHJldHVybiBnZXRTZXJ2aWNlQ2xpZW50KCkuc2VuZEFjdGl2aXR5SGVhcnRiZWF0KHJlcXVlc3QpO1xuICB9O1xuICBmdW5jLmFjdGl2aXR5SUQgPSBhY3Rpdml0eUlEO1xuICByZXR1cm4gZnVuYztcbn1cblxuLyoqXG4gKiBSZXRyaWV2ZSBhbiBhY3Rpdml0eSBmdW5jdGlvbiB0aGF0IGhhcyBiZWVuIHJlZ2lzdGVyZWQgaW4gYSB3b3JrZmxvdy5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGdldENhbGxhYmxlQWN0aXZpdHkoXG4gIGFjdGl2aXR5SWQ6IHN0cmluZ1xuKTogQWN0aXZpdHlIYW5kbGVyPGFueT4gfCB1bmRlZmluZWQge1xuICByZXR1cm4gY2FsbGFibGVBY3Rpdml0aWVzKClbYWN0aXZpdHlJZF0gYXMgQWN0aXZpdHlIYW5kbGVyPGFueT47XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRDYWxsYWJsZUFjdGl2aXR5TmFtZXMoKSB7XG4gIHJldHVybiBPYmplY3Qua2V5cyhjYWxsYWJsZUFjdGl2aXRpZXMoKSk7XG59XG4iXX0=

@@ -20,3 +20,4 @@ "use strict";

// this reference will be resolved by the runtime.
call.signal = function (signal, payload, id) {
call.sendSignal = function (signal, payload) {
const signalId = typeof signal === "string" ? signal : signal.id;
return (0, send_signal_call_js_1.createSendSignalCall)({

@@ -26,3 +27,3 @@ type: signals_js_1.SignalTargetType.ChildExecution,

workflowName: call.name,
}, signal.id, payload, id);
}, signalId, payload);
};

@@ -32,2 +33,2 @@ return call;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c2lnbmFsID09PSBcInN0cmluZ1wiID8gc2lnbmFsIDogc2lnbmFsLmlkO1xuICAgIHJldHVybiBjcmVhdGVTZW5kU2lnbmFsQ2FsbChcbiAgICAgIHtcbiAgICAgICAgdHlwZTogU2lnbmFsVGFyZ2V0VHlwZS5DaGlsZEV4ZWN1dGlvbixcbiAgICAgICAgc2VxOiBjYWxsLnNlcSEsXG4gICAgICAgIHdvcmtmbG93TmFtZTogY2FsbC5uYW1lLFxuICAgICAgfSxcbiAgICAgIHNpZ25hbElkLFxuICAgICAgcGF5bG9hZFxuICAgICkgYXMgdW5rbm93biBhcyBhbnk7XG4gIH07XG5cbiAgcmV0dXJuIGNhbGw7XG59XG4iXX0=

@@ -30,3 +30,3 @@ /**

* that belongs within the service. An {@link Event} has a unique {@link name},
* may be {@link publish}ed and {@link on}d to.
* may be {@link publishEvents}ed and {@link onEvent}d to.
*/

@@ -44,3 +44,3 @@ export interface Event<E extends EventPayload = EventPayload> {

*/
on(handler: (event: E) => Promise<void>): void;
onEvent(handler: (event: E) => Promise<void>): void;
/**

@@ -51,3 +51,3 @@ * Publish events of this type within the service boundary.

*/
publish(...events: E[]): Promise<void>;
publishEvents(...events: E[]): Promise<void>;
}

@@ -105,3 +105,3 @@ /**

* const checkoutWorkflow = workflow("checkoutWorkflow", async (request) => {
* await checkoutEvent.publish({
* await checkoutEvent.publishEvents({
* customerId: request.customerId,

@@ -118,3 +118,3 @@ * cartId: request.cartId,

* ```ts
* checkoutEvent.on(async (checkout) => {
* checkoutEvent.onEvent(async (checkout) => {
* console.log(checkout);

@@ -121,0 +121,0 @@ * });

@@ -25,3 +25,3 @@ "use strict";

* const checkoutWorkflow = workflow("checkoutWorkflow", async (request) => {
* await checkoutEvent.publish({
* await checkoutEvent.publishEvents({
* customerId: request.customerId,

@@ -38,3 +38,3 @@ * cartId: request.cartId,

* ```ts
* checkoutEvent.on(async (checkout) => {
* checkoutEvent.onEvent(async (checkout) => {
* console.log(checkout);

@@ -53,3 +53,3 @@ * });

name,
on(handler) {
onEvent(handler) {
(0, global_js_1.eventSubscriptions)().push({

@@ -64,3 +64,3 @@ subscriptions: [

},
publish(...events) {
publishEvents(...events) {
const envelopes = events.map((event) => ({

@@ -82,2 +82,2 @@ name,

exports.event = event;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXZlbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscUVBQXNFO0FBQ3RFLDJDQUF5RDtBQUN6RCx5Q0FBb0U7QUFnR3BFOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBcUNHO0FBQ0gsU0FBZ0IsS0FBSyxDQUF5QixJQUFZO0lBQ3hELElBQUksSUFBQSxrQkFBTSxHQUFFLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxFQUFFO1FBQ3RCLE1BQU0sSUFBSSxLQUFLLENBQUMsb0JBQW9CLElBQUksa0JBQWtCLENBQUMsQ0FBQztLQUM3RDtJQUNELE1BQU0sS0FBSyxHQUFhO1FBQ3RCLElBQUk7UUFDSixFQUFFLENBQUMsT0FBTztZQUNSLElBQUEsOEJBQWtCLEdBQUUsQ0FBQyxJQUFJLENBQUM7Z0JBQ3hCLGFBQWEsRUFBRTtvQkFDYjt3QkFDRSxJQUFJO3FCQUNMO2lCQUNGO2dCQUNELE9BQU8sRUFBRSxPQUFxQzthQUMvQyxDQUFDLENBQUM7UUFDTCxDQUFDO1FBQ0QsT0FBTyxDQUFDLEdBQUcsTUFBTTtZQUNmLE1BQU0sU0FBUyxHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUM7Z0JBQ3ZDLElBQUk7Z0JBQ0osS0FBSzthQUNOLENBQUMsQ0FBQyx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HJpbmcpOiBFdmVudDxFPiB7XG4gIGlmIChldmVudHMoKS5oYXMobmFtZSkpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoYGV2ZW50IHdpdGggbmFtZSAnJHtuYW1lfScgYWxyZWFkeSBleGlzdHNgKTtcbiAgfVxuICBjb25zdCBldmVudDogRXZlbnQ8RT4gPSB7XG4gICAgbmFtZSxcbiAgICBvbkV2ZW50KGhhbmRsZXIpIHtcbiAgICAgIGV2ZW50U3Vic2NyaXB0aW9ucygpLnB1c2goe1xuICAgICAgICBzdWJzY3JpcHRpb25zOiBbXG4gICAgICAgICAge1xuICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICB9LFxuICAgICAgICBdLFxuICAgICAgICBoYW5kbGVyOiBoYW5kbGVyIGFzIEV2ZW50SGFuZGxlcjxFdmVudFBheWxvYWQ+LFxuICAgICAgfSk7XG4gICAgfSxcbiAgICBwdWJsaXNoRXZlbnRzKC4uLmV2ZW50cykge1xuICAgICAgY29uc3QgZW52ZWxvcGVzID0gZXZlbnRzLm1hcCgoZXZlbnQpID0+ICh7XG4gICAgICAgIG5hbWUsXG4gICAgICAgIGV2ZW50LFxuICAgICAgfSkpO1xuICAgICAgaWYgKGlzT3JjaGVzdHJhdG9yV29ya2VyKCkpIHtcbiAgICAgICAgcmV0dXJuIGNyZWF0ZVB1Ymxpc2hFdmVudHNDYWxsKGVudmVsb3BlcykgYXMgYW55O1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIGdldFNlcnZpY2VDbGllbnQoKS5wdWJsaXNoRXZlbnRzKHsgZXZlbnRzOiBlbnZlbG9wZXMgfSk7XG4gICAgICB9XG4gICAgfSxcbiAgfTtcbiAgZXZlbnRzKCkuc2V0KG5hbWUsIGV2ZW50KTtcbiAgcmV0dXJuIGV2ZW50O1xufVxuIl19

@@ -49,3 +49,3 @@ import { ActivityCall } from "./calls/activity-call.js";

/**
* Wait for all {@link activities} to complete or until at least one throws.
* Wait for all {@link activities} to succeed or until at least one throws.
*

@@ -52,0 +52,0 @@ * This is the equivalent behavior to Promise.all.

@@ -63,3 +63,3 @@ "use strict";

/**
* Wait for all {@link activities} to complete or until at least one throws.
* Wait for all {@link activities} to succeed or until at least one throws.
*

@@ -95,2 +95,2 @@ * This is the equivalent behavior to Promise.all.

global.$Eventual = exports.Eventual;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnR1YWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXZlbnR1YWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsK0RBQXdFO0FBQ3hFLGlEQUEwRDtBQUMxRCx5Q0FBMEM7QUFHMUMseURBSytCO0FBQy9CLHlFQUd1QztBQUN2QywyRUFHd0M7QUFDeEMscUVBQStFO0FBQy9FLCtEQUF3RTtBQUN4RSxpRUFBMkU7QUFDM0UsaURBQTBEO0FBQzFELGlEQUEwRDtBQUMxRCxpRUFBZ0Y7QUFDaEYsdUNBQTZDO0FBQzdDLHFFQUdxQztBQVVyQyxNQUFNLGNBQWMsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLG1CQUFtQixDQUFDLENBQUM7QUFPdkQsSUFBWSxZQWVYO0FBZkQsV0FBWSxZQUFZO0lBQ3RCLCtEQUFnQixDQUFBO0lBQ2hCLHVEQUFZLENBQUE7SUFDWixzRUFBb0IsQ0FBQTtJQUNwQix3REFBYSxDQUFBO0lBQ2IsaURBQVMsQ0FBQTtJQUNULGlFQUFpQixDQUFBO0lBQ2pCLHVFQUFvQixDQUFBO0lBQ3BCLDBFQUFzQixDQUFBO0lBQ3RCLGdEQUFTLENBQUE7SUFDVCx5RkFBNkIsQ0FBQTtJQUM3QixtRUFBa0IsQ0FBQTtJQUNsQiwrREFBZ0IsQ0FBQTtJQUNoQixtRUFBa0IsQ0FBQTtJQUNsQiwrREFBZ0IsQ0FBQTtBQUNsQixD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4gIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby12YXJcbiAgdmFyICRldmVudHVhbDogdHlwZW9mIGNoYWluO1xuICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tdmFyXG4gIHZhciAkRXZlbnR1YWw6IHR5cGVvZiBFdmVudHVhbDtcbn1cblxuZ2xvYmFsLiRldmVudHVhbCA9IGNoYWluO1xuZ2xvYmFsLiRFdmVudHVhbCA9IEV2ZW50dWFsO1xuIl19
import { EventualServiceClient } from "./service-client.js";
import { Signal, SendSignalProps, SignalPayload } from "./signals.js";
import { Signal, SendSignalProps } from "./signals.js";
import { Workflow, WorkflowOutput } from "./workflow.js";
export declare enum ExecutionStatus {
IN_PROGRESS = "IN_PROGRESS",
COMPLETE = "COMPLETE",
SUCCEEDED = "SUCCEEDED",
FAILED = "FAILED"

@@ -25,8 +25,8 @@ }

}
export type Execution<Result = any> = InProgressExecution | CompleteExecution<Result> | FailedExecution;
export type Execution<Result = any> = InProgressExecution | SucceededExecution<Result> | FailedExecution;
export interface InProgressExecution extends ExecutionBase {
status: ExecutionStatus.IN_PROGRESS;
}
export interface CompleteExecution<Result = any> extends ExecutionBase {
status: ExecutionStatus.COMPLETE;
export interface SucceededExecution<Result = any> extends ExecutionBase {
status: ExecutionStatus.SUCCEEDED;
endTime: string;

@@ -42,7 +42,7 @@ result?: Result;

export declare function isFailedExecution(execution: Execution): execution is FailedExecution;
export declare function isCompleteExecution(execution: Execution): execution is CompleteExecution;
export declare function isSucceededExecution(execution: Execution): execution is SucceededExecution;
/**
* A reference to a running execution.
*/
export declare class ExecutionHandle<W extends Workflow> {
export declare class ExecutionHandle<W extends Workflow> implements ChildExecution {
executionId: string;

@@ -58,3 +58,3 @@ private serviceClient;

*/
signal<Payload = any>(signal: string | Signal<Payload>, payload: Payload): Promise<void>;
sendSignal<Payload = any>(signal: string | Signal<Payload>, ...args: SendSignalProps<Payload>): Promise<void>;
}

@@ -73,3 +73,3 @@ /**

* const child = childWf();
* child.signal(mySignal);
* child.sendSignal(mySignal);
* await child;

@@ -81,5 +81,5 @@ * })

*/
signal<S extends Signal<any>>(signal: S, ...args: SendSignalProps<SignalPayload<S>>): Promise<void>;
sendSignal<Payload = any>(signal: string | Signal<Payload>, ...args: SendSignalProps<Payload>): Promise<void>;
}
export {};
//# sourceMappingURL=execution.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExecutionHandle = exports.isCompleteExecution = exports.isFailedExecution = exports.ExecutionStatus = void 0;
exports.ExecutionHandle = exports.isSucceededExecution = exports.isFailedExecution = exports.ExecutionStatus = void 0;
const ulidx_1 = require("ulidx");
var ExecutionStatus;
(function (ExecutionStatus) {
ExecutionStatus["IN_PROGRESS"] = "IN_PROGRESS";
ExecutionStatus["COMPLETE"] = "COMPLETE";
ExecutionStatus["SUCCEEDED"] = "SUCCEEDED";
ExecutionStatus["FAILED"] = "FAILED";

@@ -14,6 +15,6 @@ })(ExecutionStatus = exports.ExecutionStatus || (exports.ExecutionStatus = {}));

exports.isFailedExecution = isFailedExecution;
function isCompleteExecution(execution) {
return execution.status === ExecutionStatus.COMPLETE;
function isSucceededExecution(execution) {
return execution.status === ExecutionStatus.SUCCEEDED;
}
exports.isCompleteExecution = isCompleteExecution;
exports.isSucceededExecution = isSucceededExecution;
/**

@@ -36,3 +37,4 @@ * A reference to a running execution.

*/
async signal(signal, payload) {
async sendSignal(signal, ...args) {
const [payload] = args;
return this.serviceClient.sendSignal({

@@ -42,2 +44,3 @@ execution: this.executionId,

payload,
id: (0, ulidx_1.ulid)(),
});

@@ -47,2 +50,2 @@ }

exports.ExecutionHandle = ExecutionHandle;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhlY3V0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2V4ZWN1dGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjo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1xuICAgKiAgICBjaGlsZC5zZW5kU2lnbmFsKG15U2lnbmFsKTtcbiAgICogICAgYXdhaXQgY2hpbGQ7XG4gICAqIH0pXG4gICAqIGBgYFxuICAgKlxuICAgKiBAcGFyYW0gaWQgYW4gb3B0aW9uYWwsIGV4ZWN1dGlvbiB1bmlxdWUgSUQsIHdpbGwgYmUgdXNlZCB0byBkZS1kdXBlIHRoZSBzaWduYWwgYXQgdGhlIHRhcmdldCBleGVjdXRpb24uXG4gICAqL1xuICBzZW5kU2lnbmFsPFBheWxvYWQgPSBhbnk+KFxuICAgIHNpZ25hbDogc3RyaW5nIHwgU2lnbmFsPFBheWxvYWQ+LFxuICAgIC4uLmFyZ3M6IFNlbmRTaWduYWxQcm9wczxQYXlsb2FkPlxuICApOiBQcm9taXNlPHZvaWQ+O1xufVxuIl19

@@ -10,5 +10,5 @@ import { SendActivityHeartbeatResponse } from "./service-client.js";

*
* @returns {@link HeartbeatResponse} which has response.cancelled if the activity was cancelled for any reason (ex: workflow completed, failed, or the activity timed out).
* @returns {@link HeartbeatResponse} which has response.cancelled if the activity was cancelled for any reason (ex: workflow succeeded, failed, or the activity timed out).
*/
export declare function heartbeat(activityToken?: string): Promise<SendActivityHeartbeatResponse>;
export declare function sendActivityHeartbeat(activityToken?: string): Promise<SendActivityHeartbeatResponse>;
//# sourceMappingURL=heartbeat.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.heartbeat = void 0;
exports.sendActivityHeartbeat = void 0;
const global_js_1 = require("./global.js");

@@ -14,5 +14,5 @@ const flags_js_1 = require("./runtime/flags.js");

*
* @returns {@link HeartbeatResponse} which has response.cancelled if the activity was cancelled for any reason (ex: workflow completed, failed, or the activity timed out).
* @returns {@link HeartbeatResponse} which has response.cancelled if the activity was cancelled for any reason (ex: workflow succeeded, failed, or the activity timed out).
*/
async function heartbeat(activityToken) {
async function sendActivityHeartbeat(activityToken) {
if ((0, flags_js_1.isOrchestratorWorker)()) {

@@ -36,3 +36,3 @@ throw new Error("Heartbeat is not currently supported from within a workflow. Use an activity with `heartbeat()`.");

}
exports.heartbeat = heartbeat;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVhcnRiZWF0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2hlYXJ0YmVhdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwyQ0FBbUU7QUFDbkUsaURBQTRFO0FBRzVFOzs7Ozs7Ozs7R0FTRztBQUNJLEtBQUssVUFBVSxTQUFTLENBQzdCLGFBQXNCO0lBRXRCLElBQUksSUFBQSwrQkFBb0IsR0FBRSxFQUFFO1FBQzFCLE1BQU0sSUFBSSxLQUFLLENBQ2Isa0dBQWtHLENBQ25HLENBQUM7S0FDSDtTQUFNLElBQUksYUFBYSxFQUFFO1FBQ3hCLE9BQU8sTUFBTSxJQUFBLDRCQUFnQixHQUFFLENBQUMscUJBQXFCLENBQUM7WUFDcEQsYUFBYTtTQUNkLENBQUMsQ0FBQztLQUNKO1NBQU0sSUFBSSxJQUFBLDJCQUFnQixHQUFFLEVBQUU7UUFDN0IsTUFBTSxLQUFLLEdBQUcsSUFBQSw4QkFBa0IsR0FBRSxDQUFDLGFBQWEsQ0FBQztRQUNqRCxPQUFPLE1BQU0sSUFBQSw0QkFBZ0IsR0FBRSxDQUFDLHFCQUFxQixDQUFDO1lBQ3BELGFBQWEsRUFBRSxLQUFLO1NBQ3JCLENBQUMsQ0FBQztLQUNKO1NBQU07UUFDTCxNQUFNLElBQUksS0FBSyxDQUNiLDhEQUE4RCxDQUMvRCxDQUFDO0tBQ0g7QUFDSCxDQUFDO0FBckJELDhCQXFCQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGdldEFjdGl2aXR5Q29udGV4dCwgZ2V0U2VydmljZUNsaWVudCB9IGZyb20gXCIuL2dsb2JhbC5qc1wiO1xuaW1wb3J0IHsg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XQoKWAuXCJcbiAgICApO1xuICB9IGVsc2UgaWYgKGFjdGl2aXR5VG9rZW4pIHtcbiAgICByZXR1cm4gYXdhaXQgZ2V0U2VydmljZUNsaWVudCgpLnNlbmRBY3Rpdml0eUhlYXJ0YmVhdCh7XG4gICAgICBhY3Rpdml0eVRva2VuLFxuICAgIH0pO1xuICB9IGVsc2UgaWYgKGlzQWN0aXZpdHlXb3JrZXIoKSkge1xuICAgIGNvbnN0IHRva2VuID0gZ2V0QWN0aXZpdHlDb250ZXh0KCkuYWN0aXZpdHlUb2tlbjtcbiAgICByZXR1cm4gYXdhaXQgZ2V0U2VydmljZUNsaWVudCgpLnNlbmRBY3Rpdml0eUhlYXJ0YmVhdCh7XG4gICAgICBhY3Rpdml0eVRva2VuOiB0b2tlbixcbiAgICB9KTtcbiAgfSBlbHNlIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICBcIkFjdGl2aXR5IHRva2VuIG11c3QgYmUgcHJvdmlkZWQgd2hlbiBub3Qgd2l0aGluIGFuIEFjdGl2aXR5LlwiXG4gICAgKTtcbiAgfVxufVxuIl19

@@ -9,4 +9,4 @@ import { EventEnvelope } from "../../event.js";

*/
publish(...event: EventEnvelope[]): Promise<void>;
publishEvents(...event: EventEnvelope[]): Promise<void>;
}
//# sourceMappingURL=event-client.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQtY2xpZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3J1bnRpbWUvY2xpZW50cy9ldmVudC1jbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEV2ZW50RW52ZWxvcGUgfSBmcm9tIFwiLi4vLi4vZXZlbnQuanNcIjtcblxuLyoqXG4gKiBBIENsaWVudCBmb3IgZW1pdHRpbmcgZXZlbnRzIGludG8gdGhlIEV2ZW50dWFsIFNlcnZpY2UncyBldmVudCBidXMuXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgRXZlbnRDbGllbnQge1xuICAvKipcbiAgICogRW1pdCBtdWx0aXBsZSBldmVudHMgaW50byB0aGUgRXZlbnR1YWwgU2VydmljZSdzIGV2ZW50IGJ1cy5cbiAgICovXG4gIHB1Ymxpc2goLi4uZXZlbnQ6IEV2ZW50RW52ZWxvcGVbXSk6IFByb21pc2U8dm9pZD47XG59XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQtY2xpZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3J1bnRpbWUvY2xpZW50cy9ldmVudC1jbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEV2ZW50RW52ZWxvcGUgfSBmcm9tIFwiLi4vLi4vZXZlbnQuanNcIjtcblxuLyoqXG4gKiBBIENsaWVudCBmb3IgZW1pdHRpbmcgZXZlbnRzIGludG8gdGhlIEV2ZW50dWFsIFNlcnZpY2UncyBldmVudCBidXMuXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgRXZlbnRDbGllbnQge1xuICAvKipcbiAgICogRW1pdCBtdWx0aXBsZSBldmVudHMgaW50byB0aGUgRXZlbnR1YWwgU2VydmljZSdzIGV2ZW50IGJ1cy5cbiAgICovXG4gIHB1Ymxpc2hFdmVudHMoLi4uZXZlbnQ6IEV2ZW50RW52ZWxvcGVbXSk6IFByb21pc2U8dm9pZD47XG59XG4iXX0=

@@ -21,3 +21,3 @@ "use strict";

async startExecution(request) {
const executionId = await this.props.workflowClient.startWorkflow(request);
const { executionId } = await this.props.workflowClient.startExecution(request);
return new execution_js_1.ExecutionHandle(executionId, this);

@@ -44,15 +44,15 @@ }

publishEvents(request) {
return this.props.eventClient.publish(...request.events);
return this.props.eventClient.publishEvents(...request.events);
}
sendActivitySuccess(request) {
return this.props.workflowClient.completeActivity(request);
return this.props.workflowClient.sendActivitySuccess(request);
}
sendActivityFailure(request) {
return this.props.workflowClient.failActivity(request);
return this.props.workflowClient.sendActivityFailure(request);
}
sendActivityHeartbeat(request) {
return this.props.workflowClient.heartbeatActivity(request);
return this.props.workflowClient.sendActivityHeartbeat(request);
}
}
exports.RuntimeServiceClient = RuntimeServiceClient;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVudGltZS1zZXJ2aWNlLWNsaWVudHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvcnVudGltZS9jbGllbnRzL3J1bnRpbWUtc2VydmljZS1jbGllbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQWVBLHFEQUFnRTtBQUtoRSw2Q0FBa0U7QUFTbEU7Ozs7R0FJRztBQUNILE1BQWEsb0JBQW9CO0lBQy9CLFlBQW9CLEtBQWdDO1FBQWhDLFVBQUssR0FBTCxLQUFLLENBQTJCO0lBQUcsQ0FBQztJQUVqRCxLQUFLLENBQUMsWUFBWTtRQUN2QixPQUFPO1lBQ0wsU0FBUyxFQUFFLEtBQUssQ0FBQyxJQUFJLENBQUMsSUFBQSxvQkFBUyxHQUFFLENBQUMsSUFBSSxFQUFFLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsRUFBRSxJQUFJLEVBQUUsQ0FBQyxFQUFFLENBQUMsQ0FBQztTQUNwRSxDQUFDO0lBQ0osQ0FBQztJQUVNLEtBQUssQ0FBQyxjQUFjLENBQ3pCLE9BQWlDO1FBRWpDLE1BQU0sV0FBVyxHQUFHLE1BQU0sSUFBSSxDQUFDLEtBQUssQ0FBQyxjQUF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hlYXJ0YmVhdChcbiAgICByZXF1ZXN0OiBPbWl0PFNlbmRBY3Rpdml0eUhlYXJ0YmVhdFJlcXVlc3QsIFwidHlwZVwiPlxuICApOiBQcm9taXNlPFNlbmRBY3Rpdml0eUhlYXJ0YmVhdFJlc3BvbnNlPiB7XG4gICAgcmV0dXJuIHRoaXMucHJvcHMud29ya2Zsb3dDbGllbnQuc2VuZEFjdGl2aXR5SGVhcnRiZWF0KHJlcXVlc3QpO1xuICB9XG59XG4iXX0=

@@ -6,3 +6,3 @@ import { HistoryStateEvent } from "../../workflow-events.js";

import { ActivityRuntimeClient } from "./activity-runtime-client.js";
import { SendActivitySuccessRequest, SendActivityFailureRequest, GetExecutionsRequest, GetExecutionsResponse, SendActivityHeartbeatRequest, StartExecutionRequest, SendActivityHeartbeatResponse } from "../../service-client.js";
import { SendActivitySuccessRequest, SendActivityFailureRequest, GetExecutionsRequest, GetExecutionsResponse, SendActivityHeartbeatRequest, StartExecutionRequest, SendActivityHeartbeatResponse, StartExecutionResponse } from "../../service-client.js";
export declare abstract class WorkflowClient {

@@ -18,3 +18,3 @@ private activityRuntimeClient;

*/
abstract startWorkflow<W extends Workflow = Workflow>(request: StartWorkflowRequest<W>): Promise<string>;
abstract startExecution<W extends Workflow = Workflow>(request: StartChildExecutionRequest<W> | StartExecutionRequest<W>): Promise<StartExecutionResponse>;
/**

@@ -37,9 +37,9 @@ * Submit events to be processed by a workflow's orchestrator.

/**
* Completes an async activity causing it to return the given value.
* Succeeds an async activity causing it to return the given value.
*/
completeActivity({ activityToken, result, }: Omit<SendActivitySuccessRequest, "type">): Promise<void>;
sendActivitySuccess({ activityToken, result, }: Omit<SendActivitySuccessRequest, "type">): Promise<void>;
/**
* Fails an async activity causing it to throw the given error.
*/
failActivity({ activityToken, error, message, }: Omit<SendActivityFailureRequest, "type">): Promise<void>;
sendActivityFailure({ activityToken, error, message, }: Omit<SendActivityFailureRequest, "type">): Promise<void>;
/**

@@ -50,3 +50,3 @@ * Submits a "heartbeat" for the given activityToken.

*/
heartbeatActivity(request: Omit<SendActivityHeartbeatRequest, "type">): Promise<SendActivityHeartbeatResponse>;
sendActivityHeartbeat(request: Omit<SendActivityHeartbeatRequest, "type">): Promise<SendActivityHeartbeatResponse>;
private sendActivityResult;

@@ -63,15 +63,9 @@ }

}
export interface StartWorkflowRequest<W extends Workflow = Workflow> extends StartExecutionRequest<W>, WorkflowOptions {
parentExecutionId?: string;
export interface StartChildExecutionRequest<W extends Workflow = Workflow> extends StartExecutionRequest<W>, WorkflowOptions {
parentExecutionId: string;
/**
* Sequence ID of this execution if this is a child workflow
*/
seq?: number;
seq: number;
}
export interface StartWorkflowResponse {
/**
* ID of the started workflow execution.
*/
executionId: string;
}
//# sourceMappingURL=workflow-client.d.ts.map

@@ -31,7 +31,7 @@ "use strict";

/**
* Completes an async activity causing it to return the given value.
* Succeeds an async activity causing it to return the given value.
*/
async completeActivity({ activityToken, result, }) {
async sendActivitySuccess({ activityToken, result, }) {
await this.sendActivityResult(activityToken, {
type: workflow_events_js_1.WorkflowEventType.ActivityCompleted,
type: workflow_events_js_1.WorkflowEventType.ActivitySucceeded,
result,

@@ -43,3 +43,3 @@ });

*/
async failActivity({ activityToken, error, message, }) {
async sendActivityFailure({ activityToken, error, message, }) {
await this.sendActivityResult(activityToken, {

@@ -56,3 +56,3 @@ type: workflow_events_js_1.WorkflowEventType.ActivityFailed,

*/
async heartbeatActivity(request) {
async sendActivityHeartbeat(request) {
const data = (0, activity_token_js_1.decodeActivityToken)(request.activityToken);

@@ -74,2 +74,2 @@ const execution = await this.getExecution(data.payload.executionId);

exports.WorkflowClient = WorkflowClient;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2Zsb3ctY2xpZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3J1bnRpbWUvY2xpZW50cy93b3JrZmxvdy1jbGllbnQudHMiXSwibmFtZXM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q8UGF5bG9hZCA9IGFueT4ge1xuICBleGVjdXRpb246IEV4ZWN1dGlvbkhhbmRsZTxhbnk+IHwgc3RyaW5nO1xuICBzaWduYWw6IHN0cmluZyB8IFNpZ25hbDxQYXlsb2FkPjtcbiAgcGF5bG9hZD86IFBheWxvYWQ7XG4gIC8qKlxuICAgKiBFeGVjdXRpb24gc2NvcGVkIHVuaXF1ZSBldmVudCBpZC4gRHVwbGljYXRlcyB3aWxsIGJlIGRlZHVwbGljYXRlZC5cbiAgICovXG4gIGlkPzogc3RyaW5nO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIFN0YXJ0Q2hpbGRFeGVjdXRpb25SZXF1ZXN0PFcgZXh0ZW5kcyBXb3JrZmxvdyA9IFdvcmtmbG93PlxuICBleHRlbmRzIFN0YXJ0RXhlY3V0aW9uUmVxdWVzdDxXPixcbiAgICBXb3JrZmxvd09wdGlvbnMge1xuICBwYXJlbnRFeGVjdXRpb25JZDogc3RyaW5nO1xuICAvKipcbiAgICogU2VxdWVuY2UgSUQgb2YgdGhpcyBleGVjdXRpb24gaWYgdGhpcyBpcyBhIGNoaWxkIHdvcmtmbG93XG4gICAqL1xuICBzZXE6IG51bWJlcjtcbn1cbiJdfQ==
import { HistoryStateEvent } from "../../workflow-events.js";
import { CompleteExecution, FailedExecution } from "../../execution.js";
import { SucceededExecution, FailedExecution } from "../../execution.js";
import { ActivityWorkerRequest } from "../handlers/activity-worker.js";
import { WorkflowClient } from "./workflow-client.js";
export interface CompleteExecutionRequest {
export interface SucceedExecutionRequest {
executionId: string;

@@ -14,3 +14,3 @@ result?: any;

}
export declare function isFailedExecutionRequest(executionRequest: CompleteExecutionRequest | FailExecutionRequest): executionRequest is FailExecutionRequest;
export declare function isFailedExecutionRequest(executionRequest: SucceedExecutionRequest | FailExecutionRequest): executionRequest is FailExecutionRequest;
export interface UpdateHistoryRequest {

@@ -28,7 +28,7 @@ executionId: string;

abstract startActivity(request: ActivityWorkerRequest): Promise<void>;
completeExecution(request: CompleteExecutionRequest): Promise<CompleteExecution>;
succeedExecution(request: SucceedExecutionRequest): Promise<SucceededExecution>;
failExecution(request: FailExecutionRequest): Promise<FailedExecution>;
protected abstract updateExecution(request: FailExecutionRequest | CompleteExecutionRequest): Promise<CompleteExecution | FailedExecution>;
protected abstract updateExecution(request: FailExecutionRequest | SucceedExecutionRequest): Promise<SucceededExecution | FailedExecution>;
private reportCompletionToParent;
}
//# sourceMappingURL=workflow-runtime-client.d.ts.map

@@ -13,3 +13,3 @@ "use strict";

}
async completeExecution(request) {
async succeedExecution(request) {
const execution = await this.updateExecution(request);

@@ -35,3 +35,3 @@ console.log("execution", execution);

? {
type: workflow_events_js_1.WorkflowEventType.ChildWorkflowCompleted,
type: workflow_events_js_1.WorkflowEventType.ChildWorkflowSucceeded,
result: args[0],

@@ -48,2 +48,2 @@ }

exports.WorkflowRuntimeClient = WorkflowRuntimeClient;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2Zsb3ctcnVudGltZS1jbGllbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvcnVudGltZS9jbGllbnRzL3dvcmtmbG93LXJ1bnRpbWUtY2xpZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGlFQUFnRjtBQWdCaEYsU0FBZ0Isd0JBQXdCLENBQ3RDLGdCQUFpRTtJQUVqRSxPQUFPLE9BQU8sSUFBSSxnQkFBZ0IsQ0FBQztBQUNyQyxDQUFDO0FBSkQsNERBSUM7QUFPRCxNQUFzQixxQkFBcUI7SUFDekMsWUFBb0IsY0FBOEI7UUFBOUIsbUJBQWMsR0FBZCxjQUFjLENBQWdCO0lBQUcsQ0FBQztJQVUvQyxLQUFLLENBQUMsaUJBQWlCLENBQzVCLE9BQWlDO1FBRWpDLE1BQU0sU0FBUyxHQUFHLE1BQU0sSUFBSSxDQUFDLGVBQWUsQ0FB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BGYWlsRXhlY3V0aW9uUmVxdWVzdCB8IENvbXBsZXRlRXhlY3V0aW9uUmVxdWVzdFxuICApOiBQcm9taXNlPENvbXBsZXRlRXhlY3V0aW9uIHwgRmFpbGVkRXhlY3V0aW9uPjtcblxuICBwcml2YXRlIGFzeW5jIHJlcG9ydENvbXBsZXRpb25Ub1BhcmVudChcbiAgICBwYXJlbnRFeGVjdXRpb25JZDogc3RyaW5nLFxuICAgIHNlcTogbnVtYmVyLFxuICAgIC4uLmFyZ3M6IFtyZXN1bHQ6IGFueV0gfCBbZXJyb3I6IHN0cmluZywgbWVzc2FnZTogc3RyaW5nXVxuICApIHtcbiAgICBhd2FpdCB0aGlzLndvcmtmbG93Q2xpZW50LnN1Ym1pdFdvcmtmbG93VGFzayhwYXJlbnRFeGVjdXRpb25JZCwge1xuICAgICAgc2VxLFxuICAgICAgdGltZXN0YW1wOiBuZXcgRGF0ZSgpLnRvSVNPU3RyaW5nKCksXG4gICAgICAuLi4oYXJncy5sZW5ndGggPT09IDFcbiAgICAgICAgPyB7XG4gICAgICAgICAgICB0eXBlOiBXb3JrZmxvd0V2ZW50VHlwZS5DaGlsZFdvcmtmbG93Q29tcGxldGVkLFxuICAgICAgICAgICAgcmVzdWx0OiBhcmdzWzBdLFxuICAgICAgICAgIH1cbiAgICAgICAgOiB7XG4gICAgICAgICAgICB0eXBlOiBXb3JrZmxvd0V2ZW50VHlwZS5DaGlsZFdvcmtmbG93RmFpbGVkLFxuICAgICAgICAgICAgZXJyb3I6IGFyZ3NbMF0sXG4gICAgICAgICAgICBtZXNzYWdlOiBhcmdzWzFdLFxuICAgICAgICAgIH0pLFxuICAgIH0pO1xuICB9XG59XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2Zsb3ctcnVudGltZS1jbGllbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvcnVudGltZS9jbGllbnRzL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kZWQsXG4gICAgICAgICAgICByZXN1bHQ6IGFyZ3NbMF0sXG4gICAgICAgICAgfVxuICAgICAgICA6IHtcbiAgICAgICAgICAgIHR5cGU6IFdvcmtmbG93RXZlbnRUeXBlLkNoaWxkV29ya2Zsb3dGYWlsZWQsXG4gICAgICAgICAgICBlcnJvcjogYXJnc1swXSxcbiAgICAgICAgICAgIG1lc3NhZ2U6IGFyZ3NbMV0sXG4gICAgICAgICAgfSksXG4gICAgfSk7XG4gIH1cbn1cbiJdfQ==

@@ -72,3 +72,3 @@ "use strict";

async scheduleChildWorkflow(executionId, command, baseTime) {
await this.props.workflowClient.startWorkflow({
await this.props.workflowClient.startExecution({
workflow: command.name,

@@ -162,3 +162,3 @@ input: command.input,

async publishEvents(command, baseTime) {
await this.props.eventClient.publish(...command.events);
await this.props.eventClient.publishEvents(...command.events);
return (0, workflow_events_js_1.createEvent)({

@@ -172,2 +172,2 @@ type: workflow_events_js_1.WorkflowEventType.EventsPublished,

exports.CommandExecutor = CommandExecutor;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZC1leGVjdXRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9ydW50aW1lL2NvbW1hbmQtZXhlY3V0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsOENBa0J1QjtBQUN2Qiw4REFjK0I7QUFDL0IsMENBQXNFO0FBQ3RFLHdDQUF5QztBQUV6Qyx1REFBZ0Y7QUFFaEYseUNBTW9CO0FBU3BCOztHQUVHO0FBQ0gsTUFBYSxlQUFlO0lBQzFCLFlBQW9CLEtBQTJCO1FBQTNCLFVBQUssR0FBTCxLQUFLLENBQXNCO0lBQUcsQ0FBQztJQUU1QyxLQUFLLENBQUMsY0FBYyxDQUN6QixRQUFrQixFQUNsQixXQUFtQixFQUNuQixPQUFnQixFQUNoQixRQUFjO1FBRWQsS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zUHVibGlzaGVkPihcbiAgICAgIHtcbiAgICAgICAgdHlwZTogV29ya2Zsb3dFdmVudFR5cGUuRXZlbnRzUHVibGlzaGVkLFxuICAgICAgICBldmVudHM6IGNvbW1hbmQuZXZlbnRzLFxuICAgICAgICBzZXE6IGNvbW1hbmQuc2VxISxcbiAgICAgIH0sXG4gICAgICBiYXNlVGltZVxuICAgICk7XG4gIH1cbn1cbiJdfQ==

@@ -77,3 +77,3 @@ "use strict";

* The activity has declared that it is async, other than logging, there is nothing left to do here.
* The activity should call {@link WorkflowClient.completeActivity} or {@link WorkflowClient.failActivity} when it is done.
* The activity should call {@link WorkflowClient.sendActivitySuccess} or {@link WorkflowClient.sendActivityFailure} when it is done.
*/

@@ -94,3 +94,3 @@ return;

const event = (0, workflow_events_js_1.createEvent)({
type: workflow_events_js_1.WorkflowEventType.ActivityCompleted,
type: workflow_events_js_1.WorkflowEventType.ActivitySucceeded,
seq: request.command.seq,

@@ -120,3 +120,3 @@ result,

metrics.putMetric(constants_js_1.ActivityMetrics.ActivityFailed, failed ? 1 : 0, unit_js_1.Unit.Count);
metrics.putMetric(constants_js_1.ActivityMetrics.ActivityCompleted, failed ? 0 : 1, unit_js_1.Unit.Count);
metrics.putMetric(constants_js_1.ActivityMetrics.ActivitySucceeded, failed ? 0 : 1, unit_js_1.Unit.Count);
// The total time from the activity being scheduled until it's result is send to the workflow.

@@ -132,2 +132,2 @@ metrics.putMetric(constants_js_1.ActivityMetrics.TotalDuration, duration);

exports.createActivityWorker = createActivityWorker;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aXZpdHktd29ya2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3J1bnRpbWUvaGFuZGxlcnMvYWN0aXZpdHktd29ya2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLG1EQUFrRDtBQUVsRCxpRUFN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0aXZpdHlNZXRyaWNzLkNsYWltRHVyYXRpb24sICgpID0+XG4gICAgICAgICAgICBhY3Rpdml0eVJ1bnRpbWVDbGllbnQuY2xhaW1BY3Rpdml0eShcbiAgICAgICAgICAgICAgcmVxdWVzdC5leGVjdXRpb25JZCxcbiAgICAgICAgICAgICAgcmVxdWVzdC5jb21tYW5kLnNlcSxcbiAgICAgICAgICAgICAgcmVxdWVzdC5yZXRyeVxuICAgICAgICAgICAgKVxuICAgICAgICAgICkpXG4gICAgICAgICkge1xuICAgICAgICAgIG1ldHJpY3MucHV0TWV0cmljKEFjdGl2aXR5TWV0cmljcy5DbGFpbVJlamVjdGVkLCAxLCBVbml0LkNvdW50KTtcbiAgICAgICAgICBsb2dnZXIuaW5mbyhgQWN0aXZpdHkgJHthY3Rpdml0eUhhbmRsZX0gYWxyZWFkeSBjbGFpbWVkLmApO1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVxdWVzdC5jb21tYW5kLmhlYXJ0YmVhdFNlY29uZHMpIHtcbiAgICAgICAgICBhd2FpdCB0aW1lckNsaWVudC5zdGFydFRpbWVyKHtcbiAgICAgICAgICAgIGFjdGl2aXR5U2VxOiByZXF1ZXN0LmNvbW1hbmQuc2VxLFxuICAgICAgICAgICAgdHlwZTogVGltZXJSZXF1ZXN0VHlwZS5BY3Rpdml0eUhlYXJ0YmVhdE1vbml0b3IsXG4gICAgICAgICAgICBleGVjdXRpb25JZDogcmVxdWVzdC5leGVjdXRpb25JZCxcbiAgICAgICAgICAgIGhlYXJ0YmVhdFNlY29uZHM6IHJlcXVlc3QuY29tbWFuZC5oZWFydGJlYXRTZWNvbmRzLFxuICAgICAgICAgICAgc2NoZWR1bGU6IFNjaGVkdWxlLnJlbGF0aXZlKHJlcXVlc3QuY29tbWFuZC5oZWFydGJlYXRTZWNvbmRzKSxcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICBzZXRBY3Rpdml0eUNvbnRleHQo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yaWNzLkFzeW5jUmVzdWx0LCAwKTtcbiAgICAgICAgICAgIG1ldHJpY3MucHV0TWV0cmljKFxuICAgICAgICAgICAgICBBY3Rpdml0eU1ldHJpY3MuUmVzdWx0Qnl0ZXMsXG4gICAgICAgICAgICAgIEpTT04uc3RyaW5naWZ5KHJlc3VsdCkubGVuZ3RoLFxuICAgICAgICAgICAgICBVbml0LkJ5dGVzXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBtZXRyaWNzLnNldFByb3BlcnR5KEFjdGl2aXR5TWV0cmljcy5IYXNSZXN1bHQsIDApO1xuICAgICAgICAgICAgbWV0cmljcy5zZXRQcm9wZXJ0eShBY3Rpdml0eU1ldHJpY3MuQXN5bmNSZXN1bHQsIDApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGxvZ2dlci5pbmZvKFxuICAgICAgICAgICAgYEFjdGl2aXR5ICR7YWN0aXZpdHlIYW5kbGV9IHN1Y2NlZWRlZCwgcmVwb3J0aW5nIGJhY2sgdG8gZXhlY3V0aW9uLmBcbiAgICAgICAgICApO1xuXG4gICAgICAgICAgY29uc3QgZW5kVGltZSA9IGdldEVuZFRpbWUoc3RhcnQpO1xuICAgICAgICAgIGNvbnN0IGV2ZW50ID0gY3JlYXRlRXZlbnQ8QWN0aXZpdHlDb21wbGV0ZWQ+KFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICB0eXBlOiBXb3JrZmxvd0V2ZW50VHlwZS5BY3Rpdml0eUNvbXBsZXRlZCxcbiAgICAgICAgICAgICAgc2VxOiByZXF1ZXN0LmNvbW1hbmQuc2VxLFxuICAgICAgICAgICAgICByZXN1bHQsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZW5kVGltZVxuICAgICAgICAgICk7XG5cbiAgICAgICAgICBhd2FpdCBmaW5pc2hBY3Rpdml0eShcbiAgICAgICAgICAgIGV2ZW50LFxuICAgICAgICAgICAgcmVjb3JkQWdlICsgKGVuZFRpbWUuZ2V0VGltZSgpIC0gc3RhcnQuZ2V0VGltZSgpKVxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgIGNvbnN0IFtlcnJvciwgbWVzc2FnZV0gPSBleHRlbmRzRXJyb3IoZXJyKVxuICAgICAgICAgICAgPyBbZXJyLm5hbWUsIGVyci5tZXNzYWdlXVxuICAgICAgICAgICAgOiBbXCJFcnJvclwiLCBKU09OLnN0cmluZ2lmeShlcnIpXTtcblxuICAgICAgICAgIGxvZ2dlci5pbmZvKFxuICAgICAgICAgICAgYEFjdGl2aXR5ICR7YWN0aXZpdHlIYW5kbGV9IGZhaWxlZCwgcmVwb3J0aW5nIGZhaWx1cmUgYmFjayB0byBleGVjdXRpb246ICR7ZXJyb3J9OiAke21lc3NhZ2V9YFxuICAgICAgICAgICk7XG5cbiAgICAgICAgICBjb25zdCBlbmRUaW1lID0gZ2V0RW5kVGltZShzdGFydCk7XG4gICAgICAgICAgY29uc3QgZXZlbnQgPSBjcmVhdGVFdmVudDxBY3Rpdml0eUZhaWxlZD4oXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHR5cGU6IFdvcmtmbG93RXZlbnRUeXBlLkFjdGl2aXR5RmFpbGVkLFxuICAgICAgICAgICAgICBzZXE6IHJlcXVlc3QuY29tbWFuZC5zZXEsXG4gICAgICAgICAgICAgIGVycm9yLFxuICAgICAgICAgICAgICBtZXNzYWdlLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGVuZFRpbWVcbiAgICAgICAgICApO1xuXG4gICAgICAgICAgYXdhaXQgZmluaXNoQWN0aXZpdHkoXG4gICAgICAgICAgICBldmVudCxcbiAgICAgICAgICAgIHJlY29yZEFnZSArIChlbmRUaW1lLmdldFRpbWUoKSAtIHN0YXJ0LmdldFRpbWUoKSlcbiAgICAgICAgICApO1xuICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgIGNsZWFyQWN0aXZpdHlDb250ZXh0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AgICAgLy8gdG8gdGhlIHJlcXVlc3QgYmVpbmcgc2Vlbi5cbiAgICAgICAgY29uc3Qgc3RhcnQgPSBiYXNlVGltZTtcbiAgICAgICAgY29uc3QgcmVjb3JkQWdlID1cbiAgICAgICAgICBzdGFydC5nZXRUaW1lKCkgLSBuZXcgRGF0ZShyZXF1ZXN0LnNjaGVkdWxlZFRpbWUpLmdldFRpbWUoKTtcbiAgICAgICAgbWV0cmljcy5wdXRNZXRyaWMoXG4gICAgICAgICAgQWN0aXZpdHlNZXRyaWNzLkFjdGl2aXR5UmVxdWVzdEFnZSxcbiAgICAgICAgICByZWNvcmRBZ2UsXG4gICAgICAgICAgVW5pdC5NaWxsaXNlY29uZHNcbiAgICAgICAgKTtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoYXdhaXQgdGltZWQobWV0cmljcywgQWN0aXZpdHlNZXRyaWNzLkNsYWltRHVyYXRpb24sICgpID0+XG4gICAgICAgICAgICBhY3Rpdml0eVJ1bnRpbWVDbGllbnQuY2xhaW1BY3Rpdml0eShcbiAgICAgICAgICAgICAgcmVxdWVzdC5leGVjdXRpb25JZCxcbiAgICAgICAgICAgICAgcmVxdWVzdC5jb21tYW5kLnNlcSxcbiAgICAgICAgICAgICAgcmVxdWVzdC5yZXRyeVxuICAgICAgICAgICAgKVxuICAgICAgICAgICkpXG4gICAgICAgICkge1xuICAgICAgICAgIG1ldHJpY3MucHV0TWV0cmljKEFjdGl2aXR5TWV0cmljcy5DbGFpbVJlamVjdGVkLCAxLCBVbml0LkNvdW50KTtcbiAgICAgICAgICBsb2dnZXIuaW5mbyhgQWN0aXZpdHkgJHthY3Rpdml0eUhhbmRsZX0gYWxyZWFkeSBjbGFpbWVkLmApO1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVxdWVzdC5jb21tYW5kLmhlYXJ0YmVhdFNlY29uZHMpIHtcbiAgICAgICAgICBhd2FpdCB0aW1lckNsaWVudC5zdGFydFRpbW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xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICB0eXBlOiBXb3JrZmxvd0V2ZW50VHlwZS5BY3Rpdml0eUZhaWxlZCxcbiAgICAgICAgICAgICAgc2VxOiByZXF1ZXN0LmNvbW1hbmQuc2VxLFxuICAgICAgICAgICAgICBlcnJvcixcbiAgICAgICAgICAgICAgbWVzc2FnZSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBlbmRUaW1lXG4gICAgICAgICAgKTtcblxuICAgICAgICAgIGF3YWl0IGZpbmlzaEFjdGl2aXR5KFxuICAgICAgICAgICAgZXZlbnQsXG4gICAgICAgICAgICByZWNvcmRBZ2UgKyAoZW5kVGltZS5nZXRUaW1lKCkgLSBzdGFydC5nZXRUaW1lKCkpXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICBjbGVhckFjdGl2aXR5Q29udGV4dCgpO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gbG9nQWN0aXZpdHlDb21wbGV0ZU1ldHJpY3MoZmFpbGVkOiBib29sZWFuLCBkdXJhdGlvbjogbnVtYmVyKSB7XG4gICAgICAgICAgbWV0cmljcy5wdXRNZXRyaWMoXG4gICAgICAgICAgICBBY3Rpdml0eU1ldHJpY3MuQWN0aXZpdHlGYWlsZWQsXG4gICAgICAgICAgICBmYWlsZWQgPyAxIDogMCxcbiAgICAgICAgICAgIFVuaXQuQ291bnRcbiAgICAgICAgICApO1xuICAgICAgICAgIG1ldHJpY3MucHV0TWV0cmljKFxuICAgICAgICAgICAgQWN0aXZpdHlNZXRyaWNzLkFjdGl2aXR5U3VjY2VlZGVkLFxuICAgICAgICAgICAgZmFpbGVkID8gMCA6IDEsXG4gICAgICAgICAgICBVbml0LkNvdW50XG4gICAgICAgICAgKTtcbiAgICAgICAgICAvLyBUaGUgdG90YWwgdGltZSBmcm9tIHRoZSBhY3Rpdml0eSBiZWluZyBzY2hlZHVsZWQgdW50aWwgaXQncyByZXN1bHQgaXMgc2VuZCB0byB0aGUgd29ya2Zsb3cuXG4gICAgICAgICAgbWV0cmljcy5wdXRNZXRyaWMoQWN0aXZpdHlNZXRyaWNzLlRvdGFsRHVyYXRpb24sIGR1cmF0aW9uKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGFzeW5jIGZ1bmN0aW9uIGZpbmlzaEFjdGl2aXR5KFxuICAgICAgICAgIGV2ZW50OiBBY3Rpdml0eVN1Y2NlZWRlZCB8IEFjdGl2aXR5RmFpbGVkLFxuICAgICAgICAgIGR1cmF0aW9uOiBudW1iZXJcbiAgICAgICAgKSB7XG4gICAgICAgICAgYXdhaXQgdGltZWQobWV0cmljcywgQWN0aXZpdHlNZXRyaWNzLlN1Ym1pdFdvcmtmbG93VGFza0R1cmF0aW9uLCAoKSA9PlxuICAgICAgICAgICAgd29ya2Zsb3dDbGllbnQuc3VibWl0V29ya2Zsb3dUYXNrKHJlcXVlc3QuZXhlY3V0aW9uSWQsIGV2ZW50KVxuICAgICAgICAgICk7XG5cbiAgICAgICAgICBsb2dBY3Rpdml0eUNvbXBsZXRlTWV0cmljcyhpc1dvcmtmbG93RmFpbGVkKGV2ZW50KSwgZHVyYXRpb24pO1xuICAgICAgICB9XG4gICAgICB9XG4gICk7XG59XG4iXX0=

@@ -100,3 +100,3 @@ "use strict";

yield (0, workflow_events_js_1.createEvent)({
type: workflow_events_js_1.WorkflowEventType.WorkflowTaskStarted,
type: workflow_events_js_1.WorkflowEventType.WorkflowRunStarted,
}, start);

@@ -149,3 +149,3 @@ const workflowContext = {

yield (0, workflow_events_js_1.createEvent)({
type: workflow_events_js_1.WorkflowEventType.WorkflowTaskCompleted,
type: workflow_events_js_1.WorkflowEventType.WorkflowRunCompleted,
}, start);

@@ -165,3 +165,3 @@ if ((0, result_js_1.isResult)(result)) {

yield (0, workflow_events_js_1.createEvent)({
type: workflow_events_js_1.WorkflowEventType.WorkflowCompleted,
type: workflow_events_js_1.WorkflowEventType.WorkflowSucceeded,
output: result.value,

@@ -197,3 +197,3 @@ }, start);

}
if ((0, workflow_events_js_1.isWorkflowCompleted)(event) || (0, workflow_events_js_1.isWorkflowFailed)(event)) {
if ((0, workflow_events_js_1.isWorkflowSucceeded)(event) || (0, workflow_events_js_1.isWorkflowFailed)(event)) {
resultEvent = event;

@@ -255,4 +255,4 @@ }

}
else if ((0, workflow_events_js_1.isWorkflowCompleted)(resultEvent)) {
const execution = await (0, utils_js_1.timed)(metrics, constants_js_1.OrchestratorMetrics.ExecutionStatusUpdateDuration, () => workflowRuntimeClient.completeExecution({
else if ((0, workflow_events_js_1.isWorkflowSucceeded)(resultEvent)) {
const execution = await (0, utils_js_1.timed)(metrics, constants_js_1.OrchestratorMetrics.ExecutionStatusUpdateDuration, () => workflowRuntimeClient.succeedExecution({
executionId,

@@ -292,7 +292,7 @@ result: resultEvent.output,

function logExecutionCompleteMetrics(execution) {
metrics.putMetric(constants_js_1.OrchestratorMetrics.ExecutionComplete, execution.status === execution_js_1.ExecutionStatus.COMPLETE ? 1 : 0, unit_js_1.Unit.Count);
metrics.putMetric(constants_js_1.OrchestratorMetrics.ExecutionFailed, execution.status === execution_js_1.ExecutionStatus.COMPLETE ? 0 : 1, unit_js_1.Unit.Count);
metrics.putMetric(constants_js_1.OrchestratorMetrics.ExecutionComplete, execution.status === execution_js_1.ExecutionStatus.SUCCEEDED ? 1 : 0, unit_js_1.Unit.Count);
metrics.putMetric(constants_js_1.OrchestratorMetrics.ExecutionFailed, execution.status === execution_js_1.ExecutionStatus.SUCCEEDED ? 0 : 1, unit_js_1.Unit.Count);
metrics.putMetric(constants_js_1.OrchestratorMetrics.ExecutionTotalDuration, new Date(execution.endTime).getTime() -
new Date(execution.startTime).getTime());
if ((0, execution_js_1.isCompleteExecution)(execution)) {
if ((0, execution_js_1.isSucceededExecution)(execution)) {
metrics.putMetric(constants_js_1.OrchestratorMetrics.ExecutionResultBytes, execution.result ? JSON.stringify(execution.result).length : 0, unit_js_1.Unit.Bytes);

@@ -314,2 +314,2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WF0ZUV2ZW50PFdvcmtmbG93VGltZWRPdXQ+KFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgdHlwZTogV29ya2Zsb3dFdmVudFR5cGUuV29ya2Zsb3dUaW1lZE91dCxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgc3RhcnRcbiAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICBleGVjdXRpb25JZCxcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbWV0cmljcy5zZXRQcm9wZXJ0eShPcmNoZXN0cmF0b3JNZXRyaWNzLlRpbWVvdXRTdGFydGVkLCAwKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB7XG4gICAgICAgICAgcmVzdWx0LFxuICAgICAgICAgIGNvbW1hbmRzOiBuZXdDb21tYW5kcyxcbiAgICAgICAgICBoaXN0b3J5OiB1cGRhdGVkSGlzdG9yeUV2ZW50cyxcbiAgICAgICAgfSA9IHRpbWVkU3luYyhcbiAgICAgICAgICBtZXRyaWNzLFxuICAgICAgICAgIE9yY2hlc3RyYXRvck1ldHJpY3MuQWR2YW5jZUV4ZWN1dGlvbkR1cmF0aW9uLFxuICAgICAgICAgICgpID0+IHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHJldHVybiBwcm9ncmVzc1dvcmtmbG93KFxuICAgICAgICAgICAgICAgIHdvcmtmbG93LFxuICAgICAgICAgICAgICAgIGhpc3RvcnksXG4gICAgICAgICAgICAgICAgZXZlbnRzLFxuICAgICAgICAgICAgICAgIHdvcmtmbG93Q29udGV4dCxcbiAgICAgICAgICAgICAgICBleGVjdXRpb25JZCxcbiAgICAgICAgICAgICAgICBiYXNlVGltZVxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG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AgIGNvbnN0IFtlcnJvciwgbWVzc2FnZV0gPSBleHRlbmRzRXJyb3IocmVzdWx0LmVycm9yKVxuICAgICAgICAgICAgICA/IFtyZXN1bHQuZXJyb3IubmFtZSwgcmVzdWx0LmVycm9yLm1lc3NhZ2VdXG4gICAgICAgICAgICAgIDogW1wiRXJyb3JcIiwgSlNPTi5zdHJpbmdpZnkocmVzdWx0LmVycm9yKV07XG4gICAgICAgICAgICB5aWVsZCBjcmVhdGVFdmVudDxXb3JrZmxvd0ZhaWxlZD4oXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0eXBlOiBXb3JrZmxvd0V2ZW50VHlwZS5Xb3JrZmxvd0ZhaWxlZCxcbiAgICAgICAgICAgICAgICBlcnJvcixcbiAgICAgICAgICAgICAgICBtZXNzYWdlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBzdGFydFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9IGVsc2UgaWYgKGlzUmVzb2x2ZWQ8YW55PihyZXN1bHQpKSB7XG4gICAgICAgICAgICB5aWVsZCBjcmVhdGVFdmVudDxXb3JrZmxvd0NvbXBsZXRlZD4oXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0eXBlOiBXb3JrZmxvd0V2ZW50VHlwZS5Xb3JrZmxvd0NvbXBsZXRlZCxcbiAgICAgICAgICAgICAgICBvdXRwdXQ6IHJlc3VsdC52YWx1ZSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgc3RhcnRcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgIH1cblxuICAgICAgLyoqXG4gICAgICAgKiBQYXJ0aXRpb25zIHRoZSBldmVudHMgb3V0cHV0IGJ5IHRoZSB3b3JrZmxvdy5cbiAgICAgICAqXG4gICAgICAgKiBXZSBuZWVkIHR3byBkaWZmZXJlbnQgY29sbGVjdG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vdGhlcnMgaGF2ZSBmYWlsZWQpLlxuICAgICAgICAgKiBJZiBzbywgY2hlY2sgdG8gc2VlIGlmIHRoZSB3b3JrZmxvdyBoYXMgdGltZW91dCB0byBzdGFydC5cbiAgICAgICAgICovXG4gICAgICAgIGlmICghc3RhcnRFdmVudCkge1xuICAgICAgICAgIGNvbnN0IG5ld1dvcmtmbG93U3RhcnQgPSBldmVudHMuZmluZChpc1dvcmtmbG93U3RhcnRlZCk7XG5cbiAgICAgICAgICBpZiAobmV3V29ya2Zsb3dTdGFydD8udGltZW91dFRpbWUpIHtcbiAgICAgICAgICAgIG1ldHJpY3Muc2V0UHJvcGVydHkoT3JjaGVzdHJhdG9yTWV0cmljcy5UaW1lb3V0U3RhcnRlZCwgMSk7XG4gICAgICAgICAgICBhd2FpdCB0aW1lZChcbiAgICAgICAgICAgICAgbWV0cmljcyxcbiAgICAgICAgICAgICAgT3JjaGVzdHJhdG9yTWV0cmljcy5UaW1lb3V0U3RhcnRlZER1cmF0aW9uLFxuICAgICAgICAgICAgICAoKSA9PlxuICAgICAgICAgICAgICAgIHRpbWVyQ2xpZW50LnNjaGVkdWxlRXZlbnQ8V29ya2Zsb3dUaW1lZE91dD4oe1xuICAgICAgICAgICAgICAgICAgc2NoZWR1bGU6IFNjaGVkdWxlLmFic29sdXRlKG5ld1dvcmtmbG93U3RhcnQudGltZW91dFRpbWUhKSxcbiAgICAgICAgICAgICAgICAgIGV2ZW50OiBjcmVhdGVFdmVudDxXb3JrZmxvd1RpbWVkT3V0PihcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFdvcmtmbG93RXZlbnRUeXBlLldvcmtmbG93VGltZWRPdXQsXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0XG4gICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgZXhlY3V0aW9uSWQsXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG1ldHJpY3Muc2V0UHJvcGVydHkoT3JjaGVzdHJhdG9yTWV0cmljcy5UaW1lb3V0U3RhcnRlZCwgMCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY29uc3Qge1xuICAgICAgICAgIHJlc3VsdCxcbiAgICAgICAgICBjb21tYW5kczogbmV3Q29tbWFuZHMsXG4gICAgICAgICAgaGlzdG9yeTogdXBkYXRlZEhpc3RvcnlFdmVudHMsXG4gICAgICAgIH0gPSB0aW1lZFN5bmMoXG4gICAgICAgICAgbWV0cmljcyxcbiAgICAgICAgICBPcmNoZXN0cmF0b3JNZXRyaWNzLkFkdmFuY2VFeGVjdXRpb25EdXJhdGlvbixcbiAgICAgICAgICAoKSA9PiB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICByZXR1cm4gcHJvZ3Jlc3NXb3JrZmxvdyhcbiAgICAgICAgICAgICAgICB3b3JrZmxvdyxcbiAgICAgICAgICAgICAgICBoaXN0b3J5LFxuICAgICAgICAgICAgICAgIGV2ZW50cyxcbiAgICAgICAgICAgICAgICB3b3JrZmxvd0NvbnRleHQsXG4gICAgICAgICAgICAgICAgZXhlY3V0aW9uSWQsXG4gICAgICAgICAgICAgICAgYmFzZVRpbWVcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIndvcmtmbG93IGVycm9yXCIpO1xuICAgICAgICAgICAgICBleGVjdXRpb25Mb2dnZXIuZXJyb3IoaW5zcGVjdChlcnIpKTtcbiAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgKTtcblxuICAgICAgICBtZXRyaWNzLnNldFByb3BlcnR5KFxuICAgICAgICAgIE9yY2hlc3RyYXRvck1ldHJpY3MuQWR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gICAgICAgICAge1xuICAgICAgICAgICAgICAgIHR5cGU6IFdvcmtmbG93RXZlbnRUeXBlLldvcmtmbG93RmFpbGVkLFxuICAgICAgICAgICAgICAgIGVycm9yLFxuICAgICAgICAgICAgICAgIG1lc3NhZ2UsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHN0YXJ0XG4gICAgICAgICAgICApO1xuICAgICAgICAgIH0gZWxzZSBpZiAoaXNSZXNvbHZlZDxhbnk+KHJlc3VsdCkpIHtcbiAgICAgICAgICAgIHlpZWxkIGNyZWF0ZUV2ZW50PFdvcmtmbG93U3VjY2VlZGVkPihcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHR5cGU6IFdvcmtmbG93RXZlbnRUeXBlLldvcmtmbG93U3VjY2VlZGVkLFxuICAgICAgICAgICAgICAgIG91dHB1dDogcmVzdWx0LnZhbHVlLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBzdGFydFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgfVxuXG4gICAgICAvKipcbiAgICAgICAqIFBhcnRpdGlvbnMgdGhlIGV2ZW50cyBvdXRwdXQgYnkgdGhlIHdvcmtmbG93LlxuICAgICAgICpcbiAgICAgICAqIFdlIG5lZWQgdHdvIGRpZmZlcmVudCBjb2xsZWN0aW9uIG9mIGV2ZW50cy5cbiAgICAgICAqXG4gICAgICAgKiBIaXN0b3J5IEV2ZW50cyAtIHRoZXNlIGFyZSB0aGUgZXZlbnRzIHRoYXQgd29ya2Zsb3cgdXNlcyB0byBtYWludGFpbiBzdGF0ZS5cbiAgICAgICAqICAgICAgICAgICAgICAgICAgZWFjaCBydW4gb2YgdGhlIHdvcmtmbG93IHdlIG1heSBmaWx0ZXIgb3IgYWRkIGV2ZW50cyB0byB0aGlzIGNvbGxlY3Rpb24uXG4gICAgICAgKiAgICAgICAgICAgICAgICAgIHR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ZChcbiAgICAgICAgICAgIG1ldHJpY3MsXG4gICAgICAgICAgICBPcmNoZXN0cmF0b3JNZXRyaWNzLkV4ZWN1dGlvblN0YXR1c1VwZGF0ZUR1cmF0aW9uLFxuICAgICAgICAgICAgKCkgPT5cbiAgICAgICAgICAgICAgd29ya2Zsb3dSdW50aW1lQ2xpZW50LmZhaWxFeGVjdXRpb24oe1xuICAgICAgICAgICAgICAgIGV4ZWN1dGlvbklkLFxuICAgICAgICAgICAgICAgIGVycm9yOiByZXN1bHRFdmVudC5lcnJvcixcbiAgICAgICAgICAgICAgICBtZXNzYWdlOiByZXN1bHRFdmVudC5tZXNzYWdlLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICk7XG5cbiAgICAgICAgICBsb2dFeGVjdXRpb25Db21wbGV0ZU1ldHJpY3MoZXhlY3V0aW9uKTtcbiAgICAgICAgfSBlbHNlIGlmIChpc1dvcmtmbG93U3VjY2VlZGVkKHJlc3VsdEV2ZW50KSkge1xuICAgICAgICAgIGNvbnN0IGV4ZWN1dGlvbiA9IGF3YWl0IHRpbWVkKFxuICAgICAgICAgICAgbWV0cmljcyxcbiAgICAgICAgICAgIE9yY2hlc3RyYXRvck1ldHJpY3MuRXhlY3V0aW9uU3RhdHVzVXBkYXRlRHVyYXRpb24sXG4gICAgICAgICAgICAoKSA9PlxuICAgICAgICAgICAgICB3b3JrZmxvd1J1bnRpbWVDbGllbnQuc3VjY2VlZEV4ZWN1dGlvbih7XG4gICAgICAgICAgICAgICAgZXhlY3V0aW9uSWQsXG4gICAgICAgICAgICAgICAgcmVzdWx0OiByZXN1bHRFdmVudC5vdXRwdXQsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgKTtcbiAgICAgICAgICBsb2dFeGVjdXRpb25Db21wbGV0ZU1ldHJpY3MoZXhlY3V0aW9uKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEdlbmVyYXRlIGV2ZW50cyBmcm9tIG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V2ZW50cyA9IGV2ZW50cy5maWx0ZXIoaXNTbGVlcENvbXBsZXRlZCk7XG4gIGlmIChzbGVlcENvbXBsZXRlZEV2ZW50cy5sZW5ndGggPiAwKSB7XG4gICAgY29uc3Qgc2xlZXBDb21wbGV0ZWRWYXJpYW5jZSA9IHNsZWVwQ29tcGxldGVkRXZlbnRzLm1hcChcbiAgICAgIChzKSA9PiBub3cuZ2V0VGltZSgpIC0gbmV3IERhdGUocy50aW1lc3RhbXApLmdldFRpbWUoKVxuICAgICk7XG4gICAgY29uc3QgYXZnID1cbiAgICAgIHNsZWVwQ29tcGxldGVkVmFyaWFuY2UucmVkdWNlKCh0LCBuKSA9PiB0ICsgbiwgMCkgL1xuICAgICAgc2xlZXBDb21wbGV0ZWRWYXJpYW5jZS5sZW5ndGg7XG4gICAgbWV0cmljcy5zZXRQcm9wZXJ0eShPcmNoZXN0cmF0b3JNZXRyaWNzLlNsZWVwVmFyaWFuY2VNaWxsaXMsIGF2Zyk7XG4gIH1cbn1cbiJdfQ==

@@ -153,3 +153,3 @@ export declare namespace MetricsCommon {

*/
const ActivityCompleted = "ActivityCompleted";
const ActivitySucceeded = "ActivitySucceeded";
/**

@@ -156,0 +156,0 @@ * The total duration of the activity after being scheduled, including the time

@@ -160,3 +160,3 @@ "use strict";

*/
ActivityMetrics.ActivityCompleted = "ActivityCompleted";
ActivityMetrics.ActivitySucceeded = "ActivitySucceeded";
/**

@@ -183,2 +183,2 @@ * The total duration of the activity after being scheduled, including the time

})(SchedulerForwarderMetrics = exports.SchedulerForwarderMetrics || (exports.SchedulerForwarderMetrics = {}));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3J1bnRpbWUvbWV0cmljcy9jb25zdGFudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEs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HRhc2sgdG8gU1FTIHRvIHJlc3VtZSB0aGUgd29ya2Zsb3cuXG4gICAqL1xuICBleHBvcnQgY29uc3QgU3VibWl0V29ya2Zsb3dUYXNrRHVyYXRpb24gPSBcIlN1Ym1pdFdvcmtmbG93VGFza0R1cmF0aW9uXCI7XG59XG5cbmV4cG9ydCBuYW1lc3BhY2UgU2NoZWR1bGVyRm9yd2FyZGVyTWV0cmljcyB7XG4gIC8qKlxuICAgKiBUaGUgdGltZSBiZXR3ZWVuIHRoZSBzY2hlZHVsZXIgdHJpZ2dlciB0aW1lIGFuZCB0aGUgU2NoZWR1bGVyIEZvcndhcmRlciBzZWVpbmcgdGhlIG1lc3NhZ2UuXG4gICAqL1xuICBleHBvcnQgY29uc3QgU2NoZWR1bGVyVGltZURlbGF5ID0gXCJTY2hlZHVsZXJUaW1lRGVsYXlcIjtcbiAgLyoqXG4gICAqIFNlY29uZHMgdGhlIHRpbWVyIHF1ZXVlIGlzIHRvbGQgdG8gd2FpdCB1bnRpbCBoYW5kbGluZyB0aGUgcmVxdWVzdC5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBUaW1lclF1ZXVlRGVsYXlTZWNvbmRzID0gXCJUaW1lclF1ZXVlRGVsYXlTZWNvbmRzXCI7XG59XG4iXX0=

@@ -50,3 +50,3 @@ import { EventEnvelope } from "./event.js";

/**
* Successfully Completes an async activity with the given value.
* Succeeds an async activity with the given value.
*/

@@ -66,2 +66,5 @@ sendActivitySuccess(request: Omit<SendActivitySuccessRequest, "type">): Promise<void>;

export interface StartExecutionResponse {
/**
* ID of the started workflow execution.
*/
executionId: string;

@@ -68,0 +71,0 @@ }

@@ -22,2 +22,2 @@ "use strict";

exports.isSendActivityHeartbeatRequest = isSendActivityHeartbeatRequest;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS1jbGllbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2Vydmlj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W9uIGlzU2VuZEFjdGl2aXR5SGVhcnRiZWF0UmVxdWVzdChcbiAgcmVxdWVzdDogU2VuZEFjdGl2aXR5VXBkYXRlXG4pOiByZXF1ZXN0IGlzIFNlbmRBY3Rpdml0eUhlYXJ0YmVhdFJlcXVlc3Qge1xuICByZXR1cm4gcmVxdWVzdC50eXBlID09PSBBY3Rpdml0eVVwZGF0ZVR5cGUuSGVhcnRiZWF0O1xufVxuXG5leHBvcnQgdHlwZSBTZW5kQWN0aXZpdHlVcGRhdGVSZXNwb25zZSA9IFNlbmRBY3Rpdml0eUhlYXJ0YmVhdFJlc3BvbnNlIHwgdm9pZDtcblxuZXhwb3J0IGludGVyZmFjZSBTZW5kQWN0aXZpdHlIZWFydGJlYXRSZXNwb25zZSB7XG4gIC8qKlxuICAgKiBUcnVlIHdoZW4gdGhlIGFjdGl2aXR5IGhhcyBiZWVuIGNhbmNlbGxlZC5cbiAgICpcbiAgICogVGhpcyBpcyB0aGUgb25seSB3YXkgZm9yIGEgbG9uZyBydW5uaW5nIGFjdGl2aXR5IHRvIGtub3cgaXQgd2FzIGNhbmNlbGxlZC5cbiAgICovXG4gIGNhbmNlbGxlZDogYm9vbGVhbjtcbn1cbiJdfQ==

@@ -29,3 +29,3 @@ /**

* let done = false;
* mySignal.on(async () => {
* mySignal.onSignal(async () => {
* await sleepFor(10);

@@ -42,3 +42,3 @@ * done = true;

* ```ts
* const handler = mySignal.on(() => {});
* const handler = mySignal.onSignal(() => {});
*

@@ -50,3 +50,3 @@ * await sleepFor(10);

*/
on(handler: SignalHandlerFunction<Payload>): SignalsHandler;
onSignal(handler: SignalHandlerFunction<Payload>): SignalsHandler;
/**

@@ -60,3 +60,3 @@ * Waits for a signal to be received by the workflow.

* workflow("wf", async () => {
* const payload = await mySignal.expect();
* const payload = await mySignal.expectSignal();
*

@@ -74,3 +74,3 @@ * return payload;

* try {
* const payload = await mySignal.expect({ timeoutSecond: 10 * 60 });
* const payload = await mySignal.expectSignal({ timeoutSecond: 10 * 60 });
*

@@ -84,3 +84,3 @@ * return payload;

*/
expect(opts?: ExpectSignalOptions): Promise<Payload>;
expectSignal(opts?: ExpectSignalOptions): Promise<Payload>;
/**

@@ -92,7 +92,7 @@ * Allows a {@link workflow} to send this signal to any workflow {@link Execution} by executionId.

* workflow("wf", async () => {
* mySignal.send("payload");
* mySignal.sendSignal("payload");
* })
* ```
*/
send(executionId: string, ...args: SendSignalProps<Payload>): Promise<void>;
sendSignal(executionId: string, ...args: SendSignalProps<Payload>): Promise<void>;
}

@@ -124,4 +124,3 @@ export type SignalPayload<E extends Signal<any>> = E extends Signal<infer P> ? P : never;

*/
export declare function expectSignal<SignalPayload = any>(signalId: string, opts?: ExpectSignalOptions): Promise<SignalPayload>;
export declare function expectSignal<E extends Signal<any>>(signal: E, opts?: ExpectSignalOptions): Promise<SignalPayload<E>>;
export declare function expectSignal<SignalPayload = any>(signal: Signal<SignalPayload> | string, opts?: ExpectSignalOptions): Promise<SignalPayload>;
/**

@@ -156,5 +155,4 @@ * Listens for a signal matching the signalId provided.

*/
export declare function onSignal<E extends Signal<any>>(signal: E, handler: SignalHandlerFunction<SignalPayload<E>>): SignalsHandler;
export declare function onSignal<Payload = void>(signalId: string, handler: SignalHandlerFunction<Payload>): SignalsHandler;
export type SendSignalProps<SignalPayload> = [SignalPayload] extends [undefined] | [void] ? [id?: string] : [payload: SignalPayload, id?: string];
export declare function onSignal<Payload>(signal: Signal<Payload> | string, handler: SignalHandlerFunction<Payload>): SignalsHandler;
export type SendSignalProps<SignalPayload> = [SignalPayload] extends [undefined] | [void] ? [] : [payload: SignalPayload];
/**

@@ -173,4 +171,3 @@ * Allows a {@link workflow} to send a signal to any workflow {@link Execution} by executionId.

*/
export declare function sendSignal<S extends Signal<any>>(executionId: string, signal: S, ...args: SendSignalProps<SignalPayload<S>>): Promise<void>;
export declare function sendSignal<Payload = any>(executionId: string, signalId: string, ...args: SendSignalProps<Payload>): Promise<void>;
export declare function sendSignal<Payload = any>(executionId: string, signal: string | Signal<Payload>, ...args: SendSignalProps<Payload>): Promise<void>;
export type SignalTarget = ExecutionTarget | ChildExecutionTarget;

@@ -177,0 +174,0 @@ export declare enum SignalTargetType {

@@ -30,3 +30,3 @@ "use strict";

* let done = false;
* mySignal.on(async () => {
* mySignal.onSignal(async () => {
* await sleepFor(10);

@@ -43,3 +43,3 @@ * done = true;

* ```ts
* const handler = mySignal.on(() => {});
* const handler = mySignal.onSignal(() => {});
*

@@ -51,3 +51,3 @@ * await sleepFor(10);

*/
on(handler) {
onSignal(handler) {
return onSignal(this, handler);

@@ -63,3 +63,3 @@ }

* workflow("wf", async () => {
* const payload = await mySignal.expect();
* const payload = await mySignal.expectSignal();
*

@@ -77,3 +77,3 @@ * return payload;

* try {
* const payload = await mySignal.expect({ timeoutSecond: 10 * 60 });
* const payload = await mySignal.expectSignal({ timeoutSecond: 10 * 60 });
*

@@ -87,3 +87,3 @@ * return payload;

*/
expect(opts) {
expectSignal(opts) {
return expectSignal(this, opts);

@@ -97,7 +97,7 @@ }

* workflow("wf", async () => {
* mySignal.send("payload");
* mySignal.sendSignal("payload");
* })
* ```
*/
send(executionId, ...args) {
sendSignal(executionId, ...args) {
return sendSignal(executionId, this, ...args);

@@ -107,2 +107,18 @@ }

exports.Signal = Signal;
/**
* Waits for a signal to be received by the workflow.
*
* The first signal received will resolve the Promise with the payload of the promise.
*
* ```ts
* workflow("wf", () => {
* const payload = await expectSignal("MySignal");
*
* return payload;
* });
* ```
*
* Use `opts.timeoutSeconds` to stop waiting after the provided time. The Promise will reject
* when the provided time has elapsed.
*/
function expectSignal(signal, opts) {

@@ -115,2 +131,31 @@ if (!(0, flags_js_1.isOrchestratorWorker)()) {

exports.expectSignal = expectSignal;
/**
* Listens for a signal matching the signalId provided.
*
* When the signal is received, the handler is invoked.
* If the handler return a promise, the handler is added as a {@link Chain}
* and progressed until completion.
*
* ```ts
* workflow("wf", () => {
* let done = false;
* onSignal("MySignal", async () => {
* await sleepFor(10);
* done = true;
* });
*
* await condition(() => done);
* });
* ```
*
* To remove the handler, call the dispose method.
*
* ```ts
* const handler = onSignal("MySignal", () => {});
*
* await sleepFor(10);
*
* handler.dispose();
* ```
*/
function onSignal(signal, handler) {

@@ -123,3 +168,17 @@ if (!(0, flags_js_1.isOrchestratorWorker)()) {

exports.onSignal = onSignal;
function sendSignal(executionId, signal, payload, id) {
/**
* Allows a {@link workflow} to send a signal to any workflow {@link Execution} by executionId.
*
* ```ts
* const mySignal = signal<string>("MySignal");
* workflow("wf", async () => {
* sendSignal("mySignal", "payload");
* sendSignal(mySignal, "payload");
* })
* ```
*
* @param id an optional, execution unique ID, will be used to de-dupe the signal at the target execution.
*/
function sendSignal(executionId, signal, ...args) {
const [payload] = args;
if ((0, flags_js_1.isOrchestratorWorker)()) {

@@ -132,3 +191,3 @@ return (0, send_signal_call_js_1.createSendSignalCall)({ type: SignalTargetType.Execution, executionId }, typeof signal === "string" ? signal : signal.id, payload);

signal,
id: id ?? (0, ulidx_1.ulid)(),
id: (0, ulidx_1.ulid)(),
payload,

@@ -152,2 +211,2 @@ });

exports.isExecutionTarget = isExecutionTarget;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2lnbmFscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zaWduYWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFFQUFtRTtBQUNuRSwyRUFBaUY7QUFDakYseUVBQXVFO0FBQ3ZFLGlEQUEwRDtBQUMxRCwyQ0FBK0M7QUFDL0MsaUNBQTZCO0FBa0I3QixTQUFnQixNQUFNLENBQWlCLElBQVk7SUFDakQsT0FBTyxJQUFJLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUMxQixDQUFDO0FBRkQsd0JBRUM7QUFFRCxNQUFhLE1BQU07SUFDakIsWUFBcUIsRUFBVTtRQUFWLE9BQUUsR0FBRixFQUFF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b3J0IHR5cGUgU2lnbmFsVGFyZ2V0ID0gRXhlY3V0aW9uVGFyZ2V0IHwgQ2hpbGRFeGVjdXRpb25UYXJnZXQ7XG5cbmV4cG9ydCBlbnVtIFNpZ25hbFRhcmdldFR5cGUge1xuICBFeGVjdXRpb24sXG4gIENoaWxkRXhlY3V0aW9uLFxufVxuXG5leHBvcnQgaW50ZXJmYWNlIEV4ZWN1dGlvblRhcmdldCB7XG4gIHR5cGU6IFNpZ25hbFRhcmdldFR5cGUuRXhlY3V0aW9uO1xuICBleGVjdXRpb25JZDogc3RyaW5nO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIENoaWxkRXhlY3V0aW9uVGFyZ2V0IHtcbiAgdHlwZTogU2lnbmFsVGFyZ2V0VHlwZS5DaGlsZEV4ZWN1dGlvbjtcbiAgd29ya2Zsb3dOYW1lOiBzdHJpbmc7XG4gIHNlcTogbnVtYmVyO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gaXNDaGlsZEV4ZWN1dGlvblRhcmdldChcbiAgdGFyZ2V0OiBTaWduYWxUYXJnZXRcbik6IHRhcmdldCBpcyBDaGlsZEV4ZWN1dGlvblRhcmdldCB7XG4gIHJldHVybiB0YXJnZXQudHlwZSA9PT0gU2lnbmFsVGFyZ2V0VHlwZS5DaGlsZEV4ZWN1dGlvbjtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGlzRXhlY3V0aW9uVGFyZ2V0KFxuICB0YXJnZXQ6IFNpZ25hbFRhcmdldFxuKTogdGFyZ2V0IGlzIEV4ZWN1dGlvblRhcmdldCB7XG4gIHJldHVybiB0YXJnZXQudHlwZSA9PT0gU2lnbmFsVGFyZ2V0VHlwZS5FeGVjdXRpb247XG59XG4iXX0=

@@ -15,3 +15,3 @@ import { ExecutionContext } from "./context.js";

export declare enum WorkflowEventType {
ActivityCompleted = "ActivityCompleted",
ActivitySucceeded = "ActivitySucceeded",
ActivityFailed = "ActivityFailed",

@@ -21,3 +21,3 @@ ActivityHeartbeatTimedOut = "ActivityHeartbeatTimedOut",

ActivityTimedOut = "ActivityTimedOut",
ChildWorkflowCompleted = "ChildWorkflowCompleted",
ChildWorkflowSucceeded = "ChildWorkflowSucceeded",
ChildWorkflowFailed = "ChildWorkflowFailed",

@@ -34,7 +34,7 @@ ChildWorkflowScheduled = "ChildWorkflowScheduled",

SleepScheduled = "SleepScheduled",
WorkflowCompleted = "WorkflowCompleted",
WorkflowSucceeded = "WorkflowSucceeded",
WorkflowFailed = "WorkflowFailed",
WorkflowStarted = "WorkflowStarted",
WorkflowTaskCompleted = "TaskCompleted",
WorkflowTaskStarted = "TaskStarted",
WorkflowRunCompleted = "WorkflowRunCompleted",
WorkflowRunStarted = "WorkflowRunStarted",
WorkflowTimedOut = "WorkflowTimedOut"

@@ -45,5 +45,5 @@ }

*/
export type WorkflowEvent = HistoryEvent | WorkflowTaskCompleted | WorkflowTaskStarted | WorkflowCompleted | WorkflowFailed | WorkflowStarted;
export type WorkflowEvent = HistoryEvent | WorkflowRunCompleted | WorkflowRunStarted | WorkflowSucceeded | WorkflowFailed | WorkflowStarted;
export type ScheduledEvent = ActivityScheduled | ChildWorkflowScheduled | ConditionStarted | EventsPublished | ExpectSignalStarted | SignalSent | SleepScheduled;
export type CompletedEvent = ActivityCompleted | ChildWorkflowCompleted | SleepCompleted;
export type SucceededEvent = ActivitySucceeded | ChildWorkflowSucceeded | SleepCompleted;
export type FailedEvent = ActivityFailed | ActivityHeartbeatTimedOut | ActivityTimedOut | ChildWorkflowFailed | ConditionTimedOut | ExpectSignalTimedOut;

@@ -53,3 +53,3 @@ /**

*/
export type HistoryEvent = CompletedEvent | FailedEvent | ScheduledEvent | SignalReceived | WorkflowTimedOut;
export type HistoryEvent = SucceededEvent | FailedEvent | ScheduledEvent | SignalReceived | WorkflowTimedOut;
export declare function isHistoryEvent(event: WorkflowEvent): event is HistoryEvent;

@@ -76,4 +76,4 @@ /**

}
export interface WorkflowTaskStarted extends BaseEvent {
type: WorkflowEventType.WorkflowTaskStarted;
export interface WorkflowRunStarted extends BaseEvent {
type: WorkflowEventType.WorkflowRunStarted;
/**

@@ -89,4 +89,4 @@ * An execution ID of the parent workflow execution that

}
export interface ActivityCompleted extends HistoryEventBase {
type: WorkflowEventType.ActivityCompleted;
export interface ActivitySucceeded extends HistoryEventBase {
type: WorkflowEventType.ActivitySucceeded;
result: any;

@@ -102,7 +102,7 @@ }

}
export interface WorkflowTaskCompleted extends BaseEvent {
type: WorkflowEventType.WorkflowTaskCompleted;
export interface WorkflowRunCompleted extends BaseEvent {
type: WorkflowEventType.WorkflowRunCompleted;
}
export interface WorkflowCompleted extends BaseEvent {
type: WorkflowEventType.WorkflowCompleted;
export interface WorkflowSucceeded extends BaseEvent {
type: WorkflowEventType.WorkflowSucceeded;
output: any;

@@ -120,4 +120,4 @@ }

}
export interface ChildWorkflowCompleted extends HistoryEventBase {
type: WorkflowEventType.ChildWorkflowCompleted;
export interface ChildWorkflowSucceeded extends HistoryEventBase {
type: WorkflowEventType.ChildWorkflowSucceeded;
result: any;

@@ -131,5 +131,5 @@ }

export declare function isWorkflowStarted(event: WorkflowEvent): event is WorkflowStarted;
export declare function isTaskStarted(event: WorkflowEvent): event is WorkflowTaskStarted;
export declare function isWorkflowRunStarted(event: WorkflowEvent): event is WorkflowRunStarted;
export declare function isActivityScheduled(event: WorkflowEvent): event is ActivityScheduled;
export declare function isActivityCompleted(event: WorkflowEvent): event is ActivityCompleted;
export declare function isActivitySucceeded(event: WorkflowEvent): event is ActivitySucceeded;
export declare function isActivityFailed(event: WorkflowEvent): event is ActivityFailed;

@@ -146,7 +146,7 @@ export declare function isActivityHeartbeatTimedOut(event: WorkflowEvent): event is ActivityHeartbeatTimedOut;

}
export declare function isTaskCompleted(event: WorkflowEvent): event is WorkflowTaskCompleted;
export declare function isWorkflowCompleted(event: WorkflowEvent): event is WorkflowCompleted;
export declare function isWorkflowRunCompleted(event: WorkflowEvent): event is WorkflowRunCompleted;
export declare function isWorkflowSucceeded(event: WorkflowEvent): event is WorkflowSucceeded;
export declare function isWorkflowFailed(event: WorkflowEvent): event is WorkflowFailed;
export declare function isChildWorkflowScheduled(event: WorkflowEvent): event is ChildWorkflowScheduled;
export declare function isChildWorkflowCompleted(event: WorkflowEvent): event is ChildWorkflowCompleted;
export declare function isChildWorkflowSucceeded(event: WorkflowEvent): event is ChildWorkflowSucceeded;
export declare function isChildWorkflowFailed(event: WorkflowEvent): event is ChildWorkflowFailed;

@@ -200,3 +200,3 @@ export declare function isSleepCompleted(event: WorkflowEvent): event is SleepCompleted;

export declare const isScheduledEvent: (a: any) => a is ActivityScheduled | ChildWorkflowScheduled | ConditionStarted | EventsPublished | ExpectSignalStarted | SignalSent | SleepScheduled;
export declare const isCompletedEvent: (a: any) => a is ActivityCompleted | ChildWorkflowCompleted | SleepCompleted;
export declare const isSucceededEvent: (a: any) => a is ActivitySucceeded | ChildWorkflowSucceeded | SleepCompleted;
export declare const isFailedEvent: (a: any) => a is ActivityFailed | ActivityHeartbeatTimedOut | ActivityTimedOut | ChildWorkflowFailed | ConditionTimedOut | ExpectSignalTimedOut | WorkflowTimedOut;

@@ -203,0 +203,0 @@ export declare function assertEventType<T extends WorkflowEvent>(event: any, type: T["type"]): asserts event is T;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createEvent = exports.filterEvents = exports.getEventId = exports.assertEventType = exports.isFailedEvent = exports.isCompletedEvent = exports.isScheduledEvent = exports.isWorkflowTimedOut = exports.isActivityTimedOut = exports.isConditionTimedOut = exports.isConditionStarted = exports.isEventsPublished = exports.isSignalSent = exports.isSignalReceived = exports.isExpectSignalTimedOut = exports.isExpectSignalStarted = exports.isSleepCompleted = exports.isChildWorkflowFailed = exports.isChildWorkflowCompleted = exports.isChildWorkflowScheduled = exports.isWorkflowFailed = exports.isWorkflowCompleted = exports.isTaskCompleted = exports.isSleepScheduled = exports.isActivityHeartbeatTimedOut = exports.isActivityFailed = exports.isActivityCompleted = exports.isActivityScheduled = exports.isTaskStarted = exports.isWorkflowStarted = exports.isHistoryEvent = exports.WorkflowEventType = void 0;
exports.createEvent = exports.filterEvents = exports.getEventId = exports.assertEventType = exports.isFailedEvent = exports.isSucceededEvent = exports.isScheduledEvent = exports.isWorkflowTimedOut = exports.isActivityTimedOut = exports.isConditionTimedOut = exports.isConditionStarted = exports.isEventsPublished = exports.isSignalSent = exports.isSignalReceived = exports.isExpectSignalTimedOut = exports.isExpectSignalStarted = exports.isSleepCompleted = exports.isChildWorkflowFailed = exports.isChildWorkflowSucceeded = exports.isChildWorkflowScheduled = exports.isWorkflowFailed = exports.isWorkflowSucceeded = exports.isWorkflowRunCompleted = exports.isSleepScheduled = exports.isActivityHeartbeatTimedOut = exports.isActivityFailed = exports.isActivitySucceeded = exports.isActivityScheduled = exports.isWorkflowRunStarted = exports.isWorkflowStarted = exports.isHistoryEvent = exports.WorkflowEventType = void 0;
const ulidx_1 = require("ulidx");

@@ -8,3 +8,3 @@ const util_js_1 = require("./util.js");

(function (WorkflowEventType) {
WorkflowEventType["ActivityCompleted"] = "ActivityCompleted";
WorkflowEventType["ActivitySucceeded"] = "ActivitySucceeded";
WorkflowEventType["ActivityFailed"] = "ActivityFailed";

@@ -14,3 +14,3 @@ WorkflowEventType["ActivityHeartbeatTimedOut"] = "ActivityHeartbeatTimedOut";

WorkflowEventType["ActivityTimedOut"] = "ActivityTimedOut";
WorkflowEventType["ChildWorkflowCompleted"] = "ChildWorkflowCompleted";
WorkflowEventType["ChildWorkflowSucceeded"] = "ChildWorkflowSucceeded";
WorkflowEventType["ChildWorkflowFailed"] = "ChildWorkflowFailed";

@@ -27,11 +27,11 @@ WorkflowEventType["ChildWorkflowScheduled"] = "ChildWorkflowScheduled";

WorkflowEventType["SleepScheduled"] = "SleepScheduled";
WorkflowEventType["WorkflowCompleted"] = "WorkflowCompleted";
WorkflowEventType["WorkflowSucceeded"] = "WorkflowSucceeded";
WorkflowEventType["WorkflowFailed"] = "WorkflowFailed";
WorkflowEventType["WorkflowStarted"] = "WorkflowStarted";
WorkflowEventType["WorkflowTaskCompleted"] = "TaskCompleted";
WorkflowEventType["WorkflowTaskStarted"] = "TaskStarted";
WorkflowEventType["WorkflowRunCompleted"] = "WorkflowRunCompleted";
WorkflowEventType["WorkflowRunStarted"] = "WorkflowRunStarted";
WorkflowEventType["WorkflowTimedOut"] = "WorkflowTimedOut";
})(WorkflowEventType = exports.WorkflowEventType || (exports.WorkflowEventType = {}));
function isHistoryEvent(event) {
return ((0, exports.isCompletedEvent)(event) ||
return ((0, exports.isSucceededEvent)(event) ||
(0, exports.isFailedEvent)(event) ||

@@ -47,6 +47,6 @@ (0, exports.isScheduledEvent)(event) ||

exports.isWorkflowStarted = isWorkflowStarted;
function isTaskStarted(event) {
return event.type === WorkflowEventType.WorkflowTaskStarted;
function isWorkflowRunStarted(event) {
return event.type === WorkflowEventType.WorkflowRunStarted;
}
exports.isTaskStarted = isTaskStarted;
exports.isWorkflowRunStarted = isWorkflowRunStarted;
function isActivityScheduled(event) {

@@ -56,6 +56,6 @@ return event.type === WorkflowEventType.ActivityScheduled;

exports.isActivityScheduled = isActivityScheduled;
function isActivityCompleted(event) {
return event.type === WorkflowEventType.ActivityCompleted;
function isActivitySucceeded(event) {
return event.type === WorkflowEventType.ActivitySucceeded;
}
exports.isActivityCompleted = isActivityCompleted;
exports.isActivitySucceeded = isActivitySucceeded;
function isActivityFailed(event) {

@@ -73,10 +73,10 @@ return event.type === WorkflowEventType.ActivityFailed;

exports.isSleepScheduled = isSleepScheduled;
function isTaskCompleted(event) {
return event.type === WorkflowEventType.WorkflowTaskCompleted;
function isWorkflowRunCompleted(event) {
return event.type === WorkflowEventType.WorkflowRunCompleted;
}
exports.isTaskCompleted = isTaskCompleted;
function isWorkflowCompleted(event) {
return event.type === WorkflowEventType.WorkflowCompleted;
exports.isWorkflowRunCompleted = isWorkflowRunCompleted;
function isWorkflowSucceeded(event) {
return event.type === WorkflowEventType.WorkflowSucceeded;
}
exports.isWorkflowCompleted = isWorkflowCompleted;
exports.isWorkflowSucceeded = isWorkflowSucceeded;
function isWorkflowFailed(event) {

@@ -90,6 +90,6 @@ return event.type === WorkflowEventType.WorkflowFailed;

exports.isChildWorkflowScheduled = isChildWorkflowScheduled;
function isChildWorkflowCompleted(event) {
return event.type === WorkflowEventType.ChildWorkflowCompleted;
function isChildWorkflowSucceeded(event) {
return event.type === WorkflowEventType.ChildWorkflowSucceeded;
}
exports.isChildWorkflowCompleted = isChildWorkflowCompleted;
exports.isChildWorkflowSucceeded = isChildWorkflowSucceeded;
function isChildWorkflowFailed(event) {

@@ -140,3 +140,3 @@ return event.type === WorkflowEventType.ChildWorkflowFailed;

exports.isScheduledEvent = (0, util_js_1.or)(isActivityScheduled, isChildWorkflowScheduled, isConditionStarted, isEventsPublished, isExpectSignalStarted, isSignalSent, isSleepScheduled);
exports.isCompletedEvent = (0, util_js_1.or)(isActivityCompleted, isChildWorkflowCompleted, isSleepCompleted);
exports.isSucceededEvent = (0, util_js_1.or)(isActivitySucceeded, isChildWorkflowSucceeded, isSleepCompleted);
exports.isFailedEvent = (0, util_js_1.or)(isActivityFailed, isActivityTimedOut, isActivityHeartbeatTimedOut, isChildWorkflowFailed, isConditionTimedOut, isExpectSignalTimedOut, isWorkflowTimedOut);

@@ -192,2 +192,2 @@ function assertEventType(event, type) {

exports.createEvent = createEvent;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2Zsb3ctZXZlbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3dvcmtmbG93LWV2ZW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxpQ0FBNkI7QUFHN0IsdUNBQStCO0FBZS9CLElBQVksaUJBd0JYO0FBeEJELFdBQVksaUJBQWlCO0lBQzNCLDREQUF1QyxDQUFBO0lBQ3ZDLHNEQUFpQyxDQUFBO0lBQ2pDLDRFQUF1RCxDQUFBO0lBQ3ZELD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O1xufVxuXG50eXBlIFVucmVzb2x2ZWRFdmVudDxUIGV4dGVuZHMgV29ya2Zsb3dFdmVudD4gPSBPbWl0PFQsIFwiaWRcIiB8IFwidGltZXN0YW1wXCI+O1xuXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlRXZlbnQ8VCBleHRlbmRzIFdvcmtmbG93RXZlbnQ+KFxuICBldmVudDogVW5yZXNvbHZlZEV2ZW50PFQ+LFxuICB0aW1lOiBEYXRlLFxuICBpZDogc3RyaW5nID0gdWxpZCgpXG4pOiBUIHtcbiAgY29uc3QgdGltZXN0YW1wID0gdGltZS50b0lTT1N0cmluZygpO1xuXG4gIC8vIGhpc3RvcnkgZXZlbnRzIGRvIG5vdCBoYXZlIElEcywgdXNlIGdldEV2ZW50SWRcbiAgaWYgKFxuICAgIGlzSGlzdG9yeUV2ZW50KGV2ZW50IGFzIHVua25vd24gYXMgV29ya2Zsb3dFdmVudCkgJiZcbiAgICAhaXNTaWduYWxSZWNlaXZlZChldmVudCBhcyB1bmtub3duIGFzIFdvcmtmbG93RXZlbnQpXG4gICkge1xuICAgIHJldHVybiB7IC4uLihldmVudCBhcyBhbnkpLCB0aW1lc3RhbXAgfTtcbiAgfVxuXG4gIHJldHVybiB7IC4uLmV2ZW50LCBpZCwgdGltZXN0YW1wIH0gYXMgVDtcbn1cbiJdfQ==

@@ -1,2 +0,2 @@

import { SendActivitySuccessRequest } from "./service-client.js";
import { SendActivityFailureRequest, SendActivityHeartbeatRequest, SendActivityHeartbeatResponse, SendActivitySuccessRequest } from "./service-client.js";
export interface ActivityOptions {

@@ -15,3 +15,3 @@ /**

* When set to a positive number, the activity must call {@link heartbeat} or
* {@link WorkflowClient.heartbeatActivity} at least every heartbeatSeconds.
* {@link EventualServiceClient.sendActivityHeartbeat} at least every heartbeatSeconds.
*

@@ -34,7 +34,7 @@ * If it fails to do so, the workflow will cancel the activity and throw an error.

* const asyncActivity = activity("async", () => {
* return asyncResult<string>(token => tokenEvent.publish({ token }));
* return asyncResult<string>(token => tokenEvent.publishEvents({ token }));
* });
*
* tokenEvent.on(async ({token}) => {
* await asyncActivity.complete({
* tokenEvent.onEvent(async ({token}) => {
* await asyncActivity.sendActivitySuccess({
* activityToken: token,

@@ -46,3 +46,47 @@ * result: "done"

*/
complete(request: Omit<SendActivitySuccessRequest<UnwrapAsync<Awaited<Output>>>, "type">): Promise<void>;
sendActivitySuccess(request: Omit<SendActivitySuccessRequest<Awaited<UnwrapAsync<Output>>>, "type">): Promise<void>;
/**
* Fail an activity request by its {@link SendActivityFailureRequest.activityToken}.
*
* This method is used in conjunction with {@link asyncResult} in an activity
* to perform asynchronous, long-running computations. For example:
*
* ```ts
* const tokenEvent = event("token");
*
* const asyncActivity = activity("async", () => {
* return asyncResult<string>(token => tokenEvent.publishEvents({ token }));
* });
*
* tokenEvent.onEvent(async ({token}) => {
* await asyncActivity.sendActivityFailure({
* activityToken: token,
* error: "MyError",
* message: "Something went wrong"
* });
* })
* ```
*/
sendActivityFailure(request: Omit<SendActivityFailureRequest, "type">): Promise<void>;
/**
* Heartbeat an activity request by its {@link SendActivityHeartbeatRequest.activityToken}.
*
* This method is used in conjunction with {@link asyncResult} in an activity
* to perform asynchronous, long-running computations. For example:
*
* ```ts
* const tokenEvent = event("token");
*
* const asyncActivity = activity("async", () => {
* return asyncResult<string>(token => tokenEvent.publishEvents({ token }));
* });
*
* tokenEvent.onEvent(async ({token}) => {
* await asyncActivity.sendActivityFailure({
* activityToken: token
* });
* })
* ```
*/
sendActivityHeartbeat(request: Omit<SendActivityHeartbeatRequest, "type">): Promise<SendActivityHeartbeatResponse>;
activityID: string;

@@ -68,3 +112,3 @@ }

* activity async. This allows the activity to defer sending a response from the
* current function and instead complete the activity with {@link WorkflowClient.completeActivity}.
* current function and instead complete the activity with {@link WorkflowClient.sendActivitySuccess}.
*

@@ -74,3 +118,3 @@ * ```ts

* activity("myActivity", () => {
* // tells the system that the completeActivity function will be called later with a string result.
* // tells the system that the sendActivitySuccess function will be called later with a string result.
* return asyncResult<string>(async (activityToken) => {

@@ -85,3 +129,3 @@ * // before exiting, send the activityToken to a sqs queue to be completed later

* @param tokenContext is a callback which provides the activityToken. The activity token is used
* to completeActivity and heartbeatActivity from outside of the
* to sendActivitySuccess and sendActivityHeartbeat from outside of the
* activity.

@@ -88,0 +132,0 @@ */

@@ -11,3 +11,3 @@ import { createActivityCall } from "./calls/activity-call.js";

* activity async. This allows the activity to defer sending a response from the
* current function and instead complete the activity with {@link WorkflowClient.completeActivity}.
* current function and instead complete the activity with {@link WorkflowClient.sendActivitySuccess}.
*

@@ -17,3 +17,3 @@ * ```ts

* activity("myActivity", () => {
* // tells the system that the completeActivity function will be called later with a string result.
* // tells the system that the sendActivitySuccess function will be called later with a string result.
* return asyncResult<string>(async (activityToken) => {

@@ -28,3 +28,3 @@ * // before exiting, send the activityToken to a sqs queue to be completed later

* @param tokenContext is a callback which provides the activityToken. The activity token is used
* to completeActivity and heartbeatActivity from outside of the
* to sendActivitySuccess and sendActivityHeartbeat from outside of the
* activity.

@@ -59,5 +59,11 @@ */

});
func.complete = async function (request) {
func.sendActivitySuccess = async function (request) {
return getServiceClient().sendActivitySuccess(request);
};
func.sendActivityFailure = async function (request) {
return getServiceClient().sendActivityFailure(request);
};
func.sendActivityHeartbeat = async function (request) {
return getServiceClient().sendActivityHeartbeat(request);
};
func.activityID = activityID;

@@ -75,2 +81,2 @@ return func;

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aXZpdHkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYWN0aXZpdHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDOUQsT0FBTyxFQUNMLGtCQUFrQixFQUNsQixrQkFBa0IsRUFDbEIsZ0JBQWdCLEdBQ2pCLE1BQU0sYUFBYS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naXN0ZXJlZCBpbiBhIHdvcmtmbG93LlxuICovXG5leHBvcnQgZnVuY3Rpb24gZ2V0Q2FsbGFibGVBY3Rpdml0eShcbiAgYWN0aXZpdHlJZDogc3RyaW5nXG4pOiBBY3Rpdml0eUhhbmRsZXI8YW55PiB8IHVuZGVmaW5lZCB7XG4gIHJldHVybiBjYWxsYWJsZUFjdGl2aXRpZXMoKVthY3Rpdml0eUlkXSBhcyBBY3Rpdml0eUhhbmRsZXI8YW55Pjtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGdldENhbGxhYmxlQWN0aXZpdHlOYW1lcygpIHtcbiAgcmV0dXJuIE9iamVjdC5rZXlzKGNhbGxhYmxlQWN0aXZpdGllcygpKTtcbn1cbiJdfQ==

@@ -16,3 +16,4 @@ import { createEventual, EventualKind, isEventualOfKind, } from "../eventual.js";

// this reference will be resolved by the runtime.
call.signal = function (signal, payload, id) {
call.sendSignal = function (signal, payload) {
const signalId = typeof signal === "string" ? signal : signal.id;
return createSendSignalCall({

@@ -22,6 +23,6 @@ type: SignalTargetType.ChildExecution,

workflowName: call.name,
}, signal.id, payload, id);
}, signalId, payload);
};
return call;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2Zsb3ctY2FsbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jYWxscy93b3JrZmxvdy1jYWxsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxjQUFjLEVBR2QsWUFBWSxFQUNaLGdCQUFnQixHQUNqQixNQUFNLGdCQUFnQixDQUFDO0FBRXhCLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUVoRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFakQsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQ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JrZmxvd05hbWU6IGNhbGwubmFtZSxcbiAgICAgIH0sXG4gICAgICBzaWduYWxJZCxcbiAgICAgIHBheWxvYWRcbiAgICApIGFzIHVua25vd24gYXMgYW55O1xuICB9O1xuXG4gIHJldHVybiBjYWxsO1xufVxuIl19

@@ -30,3 +30,3 @@ /**

* that belongs within the service. An {@link Event} has a unique {@link name},
* may be {@link publish}ed and {@link on}d to.
* may be {@link publishEvents}ed and {@link onEvent}d to.
*/

@@ -44,3 +44,3 @@ export interface Event<E extends EventPayload = EventPayload> {

*/
on(handler: (event: E) => Promise<void>): void;
onEvent(handler: (event: E) => Promise<void>): void;
/**

@@ -51,3 +51,3 @@ * Publish events of this type within the service boundary.

*/
publish(...events: E[]): Promise<void>;
publishEvents(...events: E[]): Promise<void>;
}

@@ -105,3 +105,3 @@ /**

* const checkoutWorkflow = workflow("checkoutWorkflow", async (request) => {
* await checkoutEvent.publish({
* await checkoutEvent.publishEvents({
* customerId: request.customerId,

@@ -118,3 +118,3 @@ * cartId: request.cartId,

* ```ts
* checkoutEvent.on(async (checkout) => {
* checkoutEvent.onEvent(async (checkout) => {
* console.log(checkout);

@@ -121,0 +121,0 @@ * });

@@ -22,3 +22,3 @@ import { createPublishEventsCall } from "./calls/send-events-call.js";

* const checkoutWorkflow = workflow("checkoutWorkflow", async (request) => {
* await checkoutEvent.publish({
* await checkoutEvent.publishEvents({
* customerId: request.customerId,

@@ -35,3 +35,3 @@ * cartId: request.cartId,

* ```ts
* checkoutEvent.on(async (checkout) => {
* checkoutEvent.onEvent(async (checkout) => {
* console.log(checkout);

@@ -50,3 +50,3 @@ * });

name,
on(handler) {
onEvent(handler) {
eventSubscriptions().push({

@@ -61,3 +61,3 @@ subscriptions: [

},
publish(...events) {
publishEvents(...events) {
const envelopes = events.map((event) => ({

@@ -78,2 +78,2 @@ name,

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQuanMiLCJzb3VyY2VSb290Ijoi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aGFzKG5hbWUpKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKGBldmVudCB3aXRoIG5hbWUgJyR7bmFtZX0nIGFscmVhZHkgZXhpc3RzYCk7XG4gIH1cbiAgY29uc3QgZXZlbnQ6IEV2ZW50PEU+ID0ge1xuICAgIG5hbWUsXG4gICAgb25FdmVudChoYW5kbGVyKSB7XG4gICAgICBldmVudFN1YnNjcmlwdGlvbnMoKS5wdXNoKHtcbiAgICAgICAgc3Vic2NyaXB0aW9uczogW1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIG5hbWUsXG4gICAgICAgICAgfSxcbiAgICAgICAgXSxcbiAgICAgICAgaGFuZGxlcjogaGFuZGxlciBhcyBFdmVudEhhbmRsZXI8RXZlbnRQYXlsb2FkPixcbiAgICAgIH0pO1xuICAgIH0sXG4gICAgcHVibGlzaEV2ZW50cyguLi5ldmVudHMpIHtcbiAgICAgIGNvbnN0IGVudmVsb3BlcyA9IGV2ZW50cy5tYXAoKGV2ZW50KSA9PiAoe1xuICAgICAgICBuYW1lLFxuICAgICAgICBldmVudCxcbiAgICAgIH0pKTtcbiAgICAgIGlmIChpc09yY2hlc3RyYXRvcldvcmtlcigpKSB7XG4gICAgICAgIHJldHVybiBjcmVhdGVQdWJsaXNoRXZlbnRzQ2FsbChlbnZlbG9wZXMpIGFzIGFueTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBnZXRTZXJ2aWNlQ2xpZW50KCkucHVibGlzaEV2ZW50cyh7IGV2ZW50czogZW52ZWxvcGVzIH0pO1xuICAgICAgfVxuICAgIH0sXG4gIH07XG4gIGV2ZW50cygpLnNldChuYW1lLCBldmVudCk7XG4gIHJldHVybiBldmVudDtcbn1cbiJdfQ==

@@ -49,3 +49,3 @@ import { ActivityCall } from "./calls/activity-call.js";

/**
* Wait for all {@link activities} to complete or until at least one throws.
* Wait for all {@link activities} to succeed or until at least one throws.
*

@@ -52,0 +52,0 @@ * This is the equivalent behavior to Promise.all.

@@ -56,3 +56,3 @@ import { isActivityCall } from "./calls/activity-call.js";

/**
* Wait for all {@link activities} to complete or until at least one throws.
* Wait for all {@link activities} to succeed or until at least one throws.
*

@@ -88,2 +88,2 @@ * This is the equivalent behavior to Promise.all.

global.$Eventual = Eventual;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnR1YWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXZlbnR1YWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFnQixjQUFjLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUN4RSxPQUFPLEVBQVksY0FBYyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDMUQsT0FBTyxFQUFFLEtBQUssRUFBUyxNQUFNLFlBQVksQ0FBQztBQUcxQyxPQUFPLEVBQ0wsY0FBYyxFQUNkLGdCQUFnQixHQUdqQixNQUFNLHVCQUF1QixDQUFDO0FBQy9CLE9BQU8sRUFDTCxrQkFBa0IsR0FFbkIsTUFBTSwrQkFBK0IsQ0FBQztBQUN2QyxPQUFPLEVBQ0wsMkJBQTJCLEdBRTVCLE1BQU0sZ0NBQWdDLENBQUM7QUFDeEMsT0FBTyxFQUFFLGdCQUFnQixFQUFrQixNQUFNLDZCQUE2QixDQUFDO0FBQy9FLE9BQU8sRUFBRSxjQUFjLEVBQWdCLE1BQU0sMEJBQTBCLENBQUM7QUFDeEUsT0FBTyxFQUFpQixlQUFlLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUMzRSxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUMxRCxPQUFPLEVBQVksY0FBYyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDMUQsT0FBTyxFQUFtQixxQkFBcUIsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ2hGLE9BQU8s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service-client.js";
import { Signal, SendSignalProps, SignalPayload } from "./signals.js";
import { Signal, SendSignalProps } from "./signals.js";
import { Workflow, WorkflowOutput } from "./workflow.js";
export declare enum ExecutionStatus {
IN_PROGRESS = "IN_PROGRESS",
COMPLETE = "COMPLETE",
SUCCEEDED = "SUCCEEDED",
FAILED = "FAILED"

@@ -25,8 +25,8 @@ }

}
export type Execution<Result = any> = InProgressExecution | CompleteExecution<Result> | FailedExecution;
export type Execution<Result = any> = InProgressExecution | SucceededExecution<Result> | FailedExecution;
export interface InProgressExecution extends ExecutionBase {
status: ExecutionStatus.IN_PROGRESS;
}
export interface CompleteExecution<Result = any> extends ExecutionBase {
status: ExecutionStatus.COMPLETE;
export interface SucceededExecution<Result = any> extends ExecutionBase {
status: ExecutionStatus.SUCCEEDED;
endTime: string;

@@ -42,7 +42,7 @@ result?: Result;

export declare function isFailedExecution(execution: Execution): execution is FailedExecution;
export declare function isCompleteExecution(execution: Execution): execution is CompleteExecution;
export declare function isSucceededExecution(execution: Execution): execution is SucceededExecution;
/**
* A reference to a running execution.
*/
export declare class ExecutionHandle<W extends Workflow> {
export declare class ExecutionHandle<W extends Workflow> implements ChildExecution {
executionId: string;

@@ -58,3 +58,3 @@ private serviceClient;

*/
signal<Payload = any>(signal: string | Signal<Payload>, payload: Payload): Promise<void>;
sendSignal<Payload = any>(signal: string | Signal<Payload>, ...args: SendSignalProps<Payload>): Promise<void>;
}

@@ -73,3 +73,3 @@ /**

* const child = childWf();
* child.signal(mySignal);
* child.sendSignal(mySignal);
* await child;

@@ -81,5 +81,5 @@ * })

*/
signal<S extends Signal<any>>(signal: S, ...args: SendSignalProps<SignalPayload<S>>): Promise<void>;
sendSignal<Payload = any>(signal: string | Signal<Payload>, ...args: SendSignalProps<Payload>): Promise<void>;
}
export {};
//# sourceMappingURL=execution.d.ts.map

@@ -0,5 +1,6 @@

import { ulid } from "ulidx";
export var ExecutionStatus;
(function (ExecutionStatus) {
ExecutionStatus["IN_PROGRESS"] = "IN_PROGRESS";
ExecutionStatus["COMPLETE"] = "COMPLETE";
ExecutionStatus["SUCCEEDED"] = "SUCCEEDED";
ExecutionStatus["FAILED"] = "FAILED";

@@ -10,4 +11,4 @@ })(ExecutionStatus || (ExecutionStatus = {}));

}
export function isCompleteExecution(execution) {
return execution.status === ExecutionStatus.COMPLETE;
export function isSucceededExecution(execution) {
return execution.status === ExecutionStatus.SUCCEEDED;
}

@@ -31,3 +32,4 @@ /**

*/
async signal(signal, payload) {
async sendSignal(signal, ...args) {
const [payload] = args;
return this.serviceClient.sendSignal({

@@ -37,5 +39,6 @@ execution: this.executionId,

payload,
id: ulid(),
});
}
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhlY3V0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2V4ZWN1dGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQSxNQUFNLENBQU4sSUFBWSxlQUlYO0FBSkQsV0FBWSxlQUFlO0lBQ3pCLDhDQUEyQixDQUFBO0lBQzNCLHdDQUFxQixDQUFBO0lBQ3JCLG9DQUFpQixDQUFBO0FBQ25CLENBQUMsRUFKVyxlQUFlLEtBQWYsZUFBZSxRQUkxQjtBQXlDRCxNQUFNLFVBQVUsaUJBQWlCLENBQy9CLFNBQW9CO0lBRXBCLE9BQU8sU0FBUyxDQUFDLE1BQU0sS0FBSyxlQUFlLENBQUMsTUFBTSxDQUFDO0FBQ3JELENBQUM7QUFFRCxNQUFNLFVBQVUsbUJBQW1CLENBQ2pDLFNBQW9CO0lBRXBCLE9BQU8sU0FBUyxDQUFDLE1BQU0sS0FBSyxlQUFlLENBQUMsUUFBUSxDQUFDO0FBQ3ZELENBQUM7QUFFRDs7R0FFRztBQUNILE1BQU0sT0FBTyxlQUFlO0lBQzFCLFlBQ1MsV0FBbUIsRUFDbEIsYUFBb0M7UUFEckMsZ0JBQVcsR0FBWCx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W4gZXhlY3V0aW9uIHN0YXJ0ZWQgYnkgYW5vdGhlciB3b3JrZmxvdy5cbiAqL1xuZXhwb3J0IGludGVyZmFjZSBDaGlsZEV4ZWN1dGlvbiB7XG4gIC8qKlxuICAgKiBBbGxvd3MgYSB7QGxpbmsgd29ya2Zsb3d9IHRvIHNlbmQgYSBzaWduYWwgdG8gdGhlIHdvcmtmbG93IHtAbGluayBFeGVjdXRpb259LlxuICAgKlxuICAgKiBgYGB0c1xuICAgKiBjb25zdCBteVNpZ25hbCA9IHNpZ25hbDxzdHJpbmc+KFwiTXlTaWduYWxcIik7XG4gICAqIGNvbnN0IGNoaWxkV2YgPSB3b3JrZmxvdyguLi4pO1xuICAgKiB3b3JrZmxvdyhcIndmXCIsIGFzeW5jICgpID0+IHtcbiAgICogICAgY29uc3QgY2hpbGQgPSBjaGlsZFdmKCk7XG4gICAqICAgIGNoaWxkLnNlbmRTaWduYWwobXlTaWduYWwpO1xuICAgKiAgICBhd2FpdCBjaGlsZDtcbiAgICogfSlcbiAgICogYGBgXG4gICAqXG4gICAqIEBwYXJhbSBpZCBhbiBvcHRpb25hbCwgZXhlY3V0aW9uIHVuaXF1ZSBJRCwgd2lsbCBiZSB1c2VkIHRvIGRlLWR1cGUgdGhlIHNpZ25hbCBhdCB0aGUgdGFyZ2V0IGV4ZWN1dGlvbi5cbiAgICovXG4gIHNlbmRTaWduYWw8UGF5bG9hZCA9IGFueT4oXG4gICAgc2lnbmFsOiBzdHJpbmcgfCBTaWduYWw8UGF5bG9hZD4sXG4gICAgLi4uYXJnczogU2VuZFNpZ25hbFByb3BzPFBheWxvYWQ+XG4gICk6IFByb21pc2U8dm9pZD47XG59XG4iXX0=

@@ -10,5 +10,5 @@ import { SendActivityHeartbeatResponse } from "./service-client.js";

*
* @returns {@link HeartbeatResponse} which has response.cancelled if the activity was cancelled for any reason (ex: workflow completed, failed, or the activity timed out).
* @returns {@link HeartbeatResponse} which has response.cancelled if the activity was cancelled for any reason (ex: workflow succeeded, failed, or the activity timed out).
*/
export declare function heartbeat(activityToken?: string): Promise<SendActivityHeartbeatResponse>;
export declare function sendActivityHeartbeat(activityToken?: string): Promise<SendActivityHeartbeatResponse>;
//# sourceMappingURL=heartbeat.d.ts.map

@@ -11,5 +11,5 @@ import { getActivityContext, getServiceClient } from "./global.js";

*
* @returns {@link HeartbeatResponse} which has response.cancelled if the activity was cancelled for any reason (ex: workflow completed, failed, or the activity timed out).
* @returns {@link HeartbeatResponse} which has response.cancelled if the activity was cancelled for any reason (ex: workflow succeeded, failed, or the activity timed out).
*/
export async function heartbeat(activityToken) {
export async function sendActivityHeartbeat(activityToken) {
if (isOrchestratorWorker()) {

@@ -33,2 +33,2 @@ throw new Error("Heartbeat is not currently supported from within a workflow. Use an activity with `heartbeat()`.");

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVhcnRiZWF0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2hlYXJ0YmVhdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFDbkUsT0FBTyxFQUFFLGdCQUFnQixFQUFFLG9CQUFvQixFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFHNUU7Ozs7Ozs7OztHQVNHO0FBQ0gsTUFBTSxDQUFDLEtBQUssVUFBVSxTQUFTLENBQzdCLGFBQXNCO0lBRXRCLElBQUksb0JBQW9CLEVBQUUsRUFBRTtRQUMxQixNQUFNLElBQUksS0FBSyxDQUNiLGtHQUFrRyxDQUNuRyxDQUFDO0tBQ0g7U0FBTSxJQUFJLGFBQWEsRUFBRTtRQUN4QixPQUFPLE1BQU0sZ0JBQWdCLEVBQUUsQ0FBQyxxQkFBcUIsQ0FBQztZQUNwRCxhQUFhO1NBQ2QsQ0FBQyxDQUFDO0tBQ0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JdfQ==

@@ -9,4 +9,4 @@ import { EventEnvelope } from "../../event.js";

*/
publish(...event: EventEnvelope[]): Promise<void>;
publishEvents(...event: EventEnvelope[]): Promise<void>;
}
//# sourceMappingURL=event-client.d.ts.map
export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQtY2xpZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3J1bnRpbWUvY2xpZW50cy9ldmVudC1jbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEV2ZW50RW52ZWxvcGUgfSBmcm9tIFwiLi4vLi4vZXZlbnQuanNcIjtcblxuLyoqXG4gKiBBIENsaWVudCBmb3IgZW1pdHRpbmcgZXZlbnRzIGludG8gdGhlIEV2ZW50dWFsIFNlcnZpY2UncyBldmVudCBidXMuXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgRXZlbnRDbGllbnQge1xuICAvKipcbiAgICogRW1pdCBtdWx0aXBsZSBldmVudHMgaW50byB0aGUgRXZlbnR1YWwgU2VydmljZSdzIGV2ZW50IGJ1cy5cbiAgICovXG4gIHB1Ymxpc2goLi4uZXZlbnQ6IEV2ZW50RW52ZWxvcGVbXSk6IFByb21pc2U8dm9pZD47XG59XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQtY2xpZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3J1bnRpbWUvY2xpZW50cy9ldmVudC1jbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEV2ZW50RW52ZWxvcGUgfSBmcm9tIFwiLi4vLi4vZXZlbnQuanNcIjtcblxuLyoqXG4gKiBBIENsaWVudCBmb3IgZW1pdHRpbmcgZXZlbnRzIGludG8gdGhlIEV2ZW50dWFsIFNlcnZpY2UncyBldmVudCBidXMuXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgRXZlbnRDbGllbnQge1xuICAvKipcbiAgICogRW1pdCBtdWx0aXBsZSBldmVudHMgaW50byB0aGUgRXZlbnR1YWwgU2VydmljZSdzIGV2ZW50IGJ1cy5cbiAgICovXG4gIHB1Ymxpc2hFdmVudHMoLi4uZXZlbnQ6IEV2ZW50RW52ZWxvcGVbXSk6IFByb21pc2U8dm9pZD47XG59XG4iXX0=

@@ -18,3 +18,3 @@ import { ExecutionHandle } from "../../execution.js";

async startExecution(request) {
const executionId = await this.props.workflowClient.startWorkflow(request);
const { executionId } = await this.props.workflowClient.startExecution(request);
return new ExecutionHandle(executionId, this);

@@ -41,14 +41,14 @@ }

publishEvents(request) {
return this.props.eventClient.publish(...request.events);
return this.props.eventClient.publishEvents(...request.events);
}
sendActivitySuccess(request) {
return this.props.workflowClient.completeActivity(request);
return this.props.workflowClient.sendActivitySuccess(request);
}
sendActivityFailure(request) {
return this.props.workflowClient.failActivity(request);
return this.props.workflowClient.sendActivityFailure(request);
}
sendActivityHeartbeat(request) {
return this.props.workflowClient.heartbeatActivity(request);
return this.props.workflowClient.sendActivityHeartbeat(request);
}
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVudGltZS1zZXJ2aWNlLWNsaWVudHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvcnVudGltZS9jbGllbnRzL3J1bnRpbWUtc2VydmljZS1jbGllbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWVBLE9BQU8sRUFBYSxlQUFlLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUtoRSxPQUFPLEVBQXlCLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0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NzKFxuICAgIHJlcXVlc3Q6IE9taXQ8U2VuZEFjdGl2aXR5U3VjY2Vzc1JlcXVlc3Q8YW55PiwgXCJ0eXBlXCI+XG4gICk6IFByb21pc2U8dm9pZD4ge1xuICAgIHJldHVybiB0aGlzLnByb3BzLndvcmtmbG93Q2xpZW50LnNlbmRBY3Rpdml0eVN1Y2Nlc3MocmVxdWVzdCk7XG4gIH1cblxuICBwdWJsaWMgc2VuZEFjdGl2aXR5RmFpbHVyZShcbiAgICByZXF1ZXN0OiBPbWl0PFNlbmRBY3Rpdml0eUZhaWx1cmVSZXF1ZXN0LCBcInR5cGVcIj5cbiAgKTogUHJvbWlzZTx2b2lkPiB7XG4gICAgcmV0dXJuIHRoaXMucHJvcHMud29ya2Zsb3dDbGllbnQuc2VuZEFjdGl2aXR5RmFpbHVyZShyZXF1ZXN0KTtcbiAgfVxuXG4gIHB1YmxpYyBzZW5kQWN0aXZpdHlIZWFydGJlYXQoXG4gICAgcmVxdWVzdDogT21pdDxTZW5kQWN0aXZpdHlIZWFydGJlYXRSZXF1ZXN0LCBcInR5cGVcIj5cbiAgKTogUHJvbWlzZTxTZW5kQWN0aXZpdHlIZWFydGJlYXRSZXNwb25zZT4ge1xuICAgIHJldHVybiB0aGlzLnByb3BzLndvcmtmbG93Q2xpZW50LnNlbmRBY3Rpdml0eUhlYXJ0YmVhdChyZXF1ZXN0KTtcbiAgfVxufVxuIl19

@@ -6,3 +6,3 @@ import { HistoryStateEvent } from "../../workflow-events.js";

import { ActivityRuntimeClient } from "./activity-runtime-client.js";
import { SendActivitySuccessRequest, SendActivityFailureRequest, GetExecutionsRequest, GetExecutionsResponse, SendActivityHeartbeatRequest, StartExecutionRequest, SendActivityHeartbeatResponse } from "../../service-client.js";
import { SendActivitySuccessRequest, SendActivityFailureRequest, GetExecutionsRequest, GetExecutionsResponse, SendActivityHeartbeatRequest, StartExecutionRequest, SendActivityHeartbeatResponse, StartExecutionResponse } from "../../service-client.js";
export declare abstract class WorkflowClient {

@@ -18,3 +18,3 @@ private activityRuntimeClient;

*/
abstract startWorkflow<W extends Workflow = Workflow>(request: StartWorkflowRequest<W>): Promise<string>;
abstract startExecution<W extends Workflow = Workflow>(request: StartChildExecutionRequest<W> | StartExecutionRequest<W>): Promise<StartExecutionResponse>;
/**

@@ -37,9 +37,9 @@ * Submit events to be processed by a workflow's orchestrator.

/**
* Completes an async activity causing it to return the given value.
* Succeeds an async activity causing it to return the given value.
*/
completeActivity({ activityToken, result, }: Omit<SendActivitySuccessRequest, "type">): Promise<void>;
sendActivitySuccess({ activityToken, result, }: Omit<SendActivitySuccessRequest, "type">): Promise<void>;
/**
* Fails an async activity causing it to throw the given error.
*/
failActivity({ activityToken, error, message, }: Omit<SendActivityFailureRequest, "type">): Promise<void>;
sendActivityFailure({ activityToken, error, message, }: Omit<SendActivityFailureRequest, "type">): Promise<void>;
/**

@@ -50,3 +50,3 @@ * Submits a "heartbeat" for the given activityToken.

*/
heartbeatActivity(request: Omit<SendActivityHeartbeatRequest, "type">): Promise<SendActivityHeartbeatResponse>;
sendActivityHeartbeat(request: Omit<SendActivityHeartbeatRequest, "type">): Promise<SendActivityHeartbeatResponse>;
private sendActivityResult;

@@ -63,15 +63,9 @@ }

}
export interface StartWorkflowRequest<W extends Workflow = Workflow> extends StartExecutionRequest<W>, WorkflowOptions {
parentExecutionId?: string;
export interface StartChildExecutionRequest<W extends Workflow = Workflow> extends StartExecutionRequest<W>, WorkflowOptions {
parentExecutionId: string;
/**
* Sequence ID of this execution if this is a child workflow
*/
seq?: number;
seq: number;
}
export interface StartWorkflowResponse {
/**
* ID of the started workflow execution.
*/
executionId: string;
}
//# sourceMappingURL=workflow-client.d.ts.map

@@ -28,7 +28,7 @@ import { createEvent, WorkflowEventType, } from "../../workflow-events.js";

/**
* Completes an async activity causing it to return the given value.
* Succeeds an async activity causing it to return the given value.
*/
async completeActivity({ activityToken, result, }) {
async sendActivitySuccess({ activityToken, result, }) {
await this.sendActivityResult(activityToken, {
type: WorkflowEventType.ActivityCompleted,
type: WorkflowEventType.ActivitySucceeded,
result,

@@ -40,3 +40,3 @@ });

*/
async failActivity({ activityToken, error, message, }) {
async sendActivityFailure({ activityToken, error, message, }) {
await this.sendActivityResult(activityToken, {

@@ -53,3 +53,3 @@ type: WorkflowEventType.ActivityFailed,

*/
async heartbeatActivity(request) {
async sendActivityHeartbeat(request) {
const data = decodeActivityToken(request.activityToken);

@@ -70,2 +70,2 @@ const execution = await this.getExecution(data.payload.executionId);

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2Zsb3ctY2xpZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3J1bnRpbWUvY2xpZW50cy93b3JrZmxvdy1jbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUdMLFdBQVcsRUFHWCxpQkFBaUIsR0FDbEIsTUFBTSwwQkFBMEIsQ0FBQztBQUNsQyxPQUFPLEVBR0wsZUFBZSxHQUNoQixNQUFNLG9CQUFvQixDQUFDO0FBRzVCLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBWTNELE1BQU0sT0FBZ0IsY0FBYztJQUNsQyxZQUNVLHFCQUE0QyxFQUMxQyxRQUFvQjtRQUR0QiwwQkFBcUIsR0FBckIscUJBQXFCLENBQXVCO1FBQzFDLGFBQVEsR0FBUixRQUFRLENBQVk7SUFDN0IsQ0FBQztJQStCSjs7Ozs7T0FLRztJQUNJLEtBQUssQ0FBQyxVQUFVLENBQUMsT0FBMEI7UUFDaEQsTUFBTSxXQUFXLEdBQ2YsT0FBTyxPQUFPLENBQUMsU0FBUyxLQUFLLFFBQVE7WUFDbkMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxTQUFTO1lBQ25CLENBQUMsQ0FBQyxPQUFPLENBQUMsU0FBUyxDQUFDLFdBQVcs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J0RXhlY3V0aW9uUmVxdWVzdDxXPixcbiAgICBXb3JrZmxvd09wdGlvbnMge1xuICBwYXJlbnRFeGVjdXRpb25JZDogc3RyaW5nO1xuICAvKipcbiAgICogU2VxdWVuY2UgSUQgb2YgdGhpcyBleGVjdXRpb24gaWYgdGhpcyBpcyBhIGNoaWxkIHdvcmtmbG93XG4gICAqL1xuICBzZXE6IG51bWJlcjtcbn1cbiJdfQ==
import { HistoryStateEvent } from "../../workflow-events.js";
import { CompleteExecution, FailedExecution } from "../../execution.js";
import { SucceededExecution, FailedExecution } from "../../execution.js";
import { ActivityWorkerRequest } from "../handlers/activity-worker.js";
import { WorkflowClient } from "./workflow-client.js";
export interface CompleteExecutionRequest {
export interface SucceedExecutionRequest {
executionId: string;

@@ -14,3 +14,3 @@ result?: any;

}
export declare function isFailedExecutionRequest(executionRequest: CompleteExecutionRequest | FailExecutionRequest): executionRequest is FailExecutionRequest;
export declare function isFailedExecutionRequest(executionRequest: SucceedExecutionRequest | FailExecutionRequest): executionRequest is FailExecutionRequest;
export interface UpdateHistoryRequest {

@@ -28,7 +28,7 @@ executionId: string;

abstract startActivity(request: ActivityWorkerRequest): Promise<void>;
completeExecution(request: CompleteExecutionRequest): Promise<CompleteExecution>;
succeedExecution(request: SucceedExecutionRequest): Promise<SucceededExecution>;
failExecution(request: FailExecutionRequest): Promise<FailedExecution>;
protected abstract updateExecution(request: FailExecutionRequest | CompleteExecutionRequest): Promise<CompleteExecution | FailedExecution>;
protected abstract updateExecution(request: FailExecutionRequest | SucceedExecutionRequest): Promise<SucceededExecution | FailedExecution>;
private reportCompletionToParent;
}
//# sourceMappingURL=workflow-runtime-client.d.ts.map

@@ -9,3 +9,3 @@ import { WorkflowEventType } from "../../workflow-events.js";

}
async completeExecution(request) {
async succeedExecution(request) {
const execution = await this.updateExecution(request);

@@ -31,3 +31,3 @@ console.log("execution", execution);

? {
type: WorkflowEventType.ChildWorkflowCompleted,
type: WorkflowEventType.ChildWorkflowSucceeded,
result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0IHwgU3VjY2VlZEV4ZWN1dGlvblJlcXVlc3RcbiAgKTogUHJvbWlzZTxTdWNjZWVkZWRFeGVjdXRpb24gfCBGYWlsZWRFeGVjdXRpb24+O1xuXG4gIHByaXZhdGUgYXN5bmMgcmVwb3J0Q29tcGxldGlvblRvUGFyZW50KFxuICAgIHBhcmVudEV4ZWN1dGlvbklkOiBzdHJpbmcsXG4gICAgc2VxOiBudW1iZXIsXG4gICAgLi4uYXJnczogW3Jlc3VsdDogYW55XSB8IFtlcnJvcjogc3RyaW5nLCBtZXNzYWdlOiBzdHJpbmddXG4gICkge1xuICAgIGF3YWl0IHRoaXMud29ya2Zsb3dDbGllbnQuc3VibWl0V29ya2Zsb3dUYXNrKHBhcmVudEV4ZWN1dGlvbklkLCB7XG4gICAgICBzZXEsXG4gICAgICB0aW1lc3RhbXA6IG5ldyBEYXRlKCkudG9JU09TdHJpbmcoKSxcbiAgICAgIC4uLihhcmdzLmxlbmd0aCA9PT0gMVxuICAgICAgICA/IHtcbiAgICAgICAgICAgIHR5cGU6IFdvcmtmbG93RXZlbnRUeXBlLkNoaWxkV29ya2Zsb3dTdWNjZWVkZWQsXG4gICAgICAgICAgICByZXN1bHQ6IGFyZ3NbMF0sXG4gICAgICAgICAgfVxuICAgICAgICA6IHtcbiAgICAgICAgICAgIHR5cGU6IFdvcmtmbG93RXZlbnRUeXBlLkNoaWxkV29ya2Zsb3dGYWlsZWQsXG4gICAgICAgICAgICBlcnJvcjogYXJnc1swXSxcbiAgICAgICAgICAgIG1lc3NhZ2U6IGFyZ3NbMV0sXG4gICAgICAgICAgfSksXG4gICAgfSk7XG4gIH1cbn1cbiJdfQ==

@@ -69,3 +69,3 @@ import { isExpectSignalCommand, isPublishEventsCommand, isScheduleActivityCommand, isScheduleWorkflowCommand, isSendSignalCommand, isSleepForCommand, isSleepUntilCommand, isStartConditionCommand, } from "../command.js";

async scheduleChildWorkflow(executionId, command, baseTime) {
await this.props.workflowClient.startWorkflow({
await this.props.workflowClient.startExecution({
workflow: command.name,

@@ -159,3 +159,3 @@ input: command.input,

async publishEvents(command, baseTime) {
await this.props.eventClient.publish(...command.events);
await this.props.eventClient.publishEvents(...command.events);
return createEvent({

@@ -168,2 +168,2 @@ type: WorkflowEventType.EventsPublished,

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWFuZC1leGVjdXRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9ydW50aW1lL2NvbW1hbmQtZXhlY3V0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUdMLHFCQUFxQixFQUNyQixzQkFBc0IsRUFDdEIseUJBQXlCLEVBQ3pCLHlCQUF5QixFQUN6QixtQkFBbUIsRUFDbkIsaUJBQWlCLEVBQ2pCLG1CQUFtQixFQUNuQix1QkFBdUIsR0FReEIsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUVMLGlCQUFpQixFQUNqQixXQUFXLEdBV1osTUFBTSx1QkFBdUIsQ0FBQztBQUMvQixPQUFPLEVBQW1CLHNCQUFzQixFQUFFLE1BQU0sYUFBYSxDQUFDO0FBQ3RFLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxZQUFZLENBQUM7QUFFekMsT0FBTyxFQUFFLHdCQUF3QixFQUFFLGlCQUFpQixFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFFaEYsT0FBTyxFQUVMLFFBQVEsR0FJVCxNQUFNLFlBQVksQ0FBQztBQVNwQjs7R0FFRztBQUNILE1BQU0sT0FBTyxlQUFlO0lBQzFCLFlBQW9CLEtBQTJCO1FBQTNCLFVBQUssR0FBTCxLQUFLLENBQXNCO0lBQUcsQ0FBQztJQUU1QyxLQUFLLENBQUMsY0FBYyxDQUN6QixRQUFrQixFQUNsQixXQUFtQixFQUNuQixPQUFnQixFQUNoQixRQUFjO1FBRWQsSUFBSSx5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ICBhd2FpdCB0aGlzLnByb3BzLmV2ZW50Q2xpZW50LnB1Ymxpc2hFdmVudHMoLi4uY29tbWFuZC5ldmVudHMpO1xuICAgIHJldHVybiBjcmVhdGVFdmVudDxFdmVudHNQdWJsaXNoZWQ+KFxuICAgICAge1xuICAgICAgICB0eXBlOiBXb3JrZmxvd0V2ZW50VHlwZS5FdmVudHNQdWJsaXNoZWQsXG4gICAgICAgIGV2ZW50czogY29tbWFuZC5ldmVudHMsXG4gICAgICAgIHNlcTogY29tbWFuZC5zZXEhLFxuICAgICAgfSxcbiAgICAgIGJhc2VUaW1lXG4gICAgKTtcbiAgfVxufVxuIl19

@@ -74,3 +74,3 @@ import { isAsyncResult } from "../../activity.js";

* The activity has declared that it is async, other than logging, there is nothing left to do here.
* The activity should call {@link WorkflowClient.completeActivity} or {@link WorkflowClient.failActivity} when it is done.
* The activity should call {@link WorkflowClient.sendActivitySuccess} or {@link WorkflowClient.sendActivityFailure} when it is done.
*/

@@ -91,3 +91,3 @@ return;

const event = createEvent({
type: WorkflowEventType.ActivityCompleted,
type: WorkflowEventType.ActivitySucceeded,
seq: request.command.seq,

@@ -117,3 +117,3 @@ result,

metrics.putMetric(ActivityMetrics.ActivityFailed, failed ? 1 : 0, Unit.Count);
metrics.putMetric(ActivityMetrics.ActivityCompleted, failed ? 0 : 1, Unit.Count);
metrics.putMetric(ActivityMetrics.ActivitySucceeded, failed ? 0 : 1, Unit.Count);
// The total time from the activity being scheduled until it's result is send to the workflow.

@@ -128,2 +128,2 @@ metrics.putMetric(ActivityMetrics.TotalDuration, duration);

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aXZpdHktd29ya2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3J1bnRpbWUvaGFuZGxlcnMvYWN0aXZpdHktd29ya2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUF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RsZXIoXG4gICAgICAgICAgcmVxdWVzdC5jb21tYW5kLm5hbWVcbiAgICAgICAgKTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBpZiAoIWFjdGl2aXR5KSB7XG4gICAgICAgICAgICBtZXRyaWNzLnB1dE1ldHJpYyhBY3Rpdml0eU1ldHJpY3MuTm90Rm91bmRFcnJvciwgMSwgVW5pdC5Db3VudCk7XG4gICAgICAgICAgICB0aHJvdyBuZXcgQWN0aXZpdHlOb3RGb3VuZEVycm9yKFxuICAgICAgICAgICAgICByZXF1ZXN0LmNvbW1hbmQubmFtZSxcbiAgICAgICAgICAgICAgYWN0aXZpdHlQcm92aWRlci5nZXRBY3Rpdml0eUlkcygpXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IGF3YWl0IHRpbWVkKFxuICAgICAgICAgICAgbWV0cmljcyxcbiAgICAgICAgICAgIEFjdGl2aXR5TWV0cmljcy5PcGVyYXRpb25EdXJhdGlvbixcbiAgICAgICAgICAgICgpID0+IGFjdGl2aXR5KC4uLnJlcXVlc3QuY29tbWFuZC5hcmdzKVxuICAgICAgICAgICk7XG4gICAgICAgICAgaWYgKGlzQXN5bmNSZXN1bHQocmVzdWx0KSkge1xuICAgICAgICAgICAgbWV0cmljcy5zZXRQcm9wZXJ0eShBY3Rpdml0eU1ldHJpY3MuSGFzUmVzdWx0LCAwKTtcbiAgICAgICAgICAgIG1ldHJpY3Muc2V0UHJvcGVydHkoQWN0aXZpdHlNZXRyaWNzLkFzeW5jUmVzdWx0LCAxKTtcblxuICAgICAgICAgICAgLy8gVE9ETzogU2VuZCBoZWFydGJlYXQgb24gc3luYyBhY3Rpdml0eSBjb21wbGV0aW9uLlxuXG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIFRoZSBhY3Rpdml0eSBoYXMgZGVjbGFyZWQgdGhhdCBpdCBpcyBhc3luYywgb3RoZXIgdGhhbiBsb2dnaW5nL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IGNvbnN0IGVuZFRpbWUgPSBnZXRFbmRUaW1lKHN0YXJ0KTtcbiAgICAgICAgICBjb25zdCBldmVudCA9IGNyZWF0ZUV2ZW50PEFjdGl2aXR5Q29tcGxldGVkPihcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgdHlwZTogV29ya2Zsb3dFdmVudFR5cGUuQWN0aXZpdHlDb21wbGV0ZWQsXG4gICAgICAgICAgICAgIHNlcTogcmVxdWVzdC5jb21tYW5kLnNlcSxcbiAgICAgICAgICAgICAgcmVzdWx0LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGVuZFRpbWVcbiAgICAgICAgICApO1xuXG4gICAgICAgICAgYXdhaXQgZmluaXNoQWN0aXZpdHkoXG4gICAgICAgICAgICBldmVudCxcbiAgICAgICAgICAgIHJlY29yZEFnZSArIChlbmRUaW1lLmdldFRpbWUoKSAtIHN0YXJ0LmdldFRpbWUoKSlcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICBjb25zdCBbZXJyb3IsIG1lc3NhZ2VdID0gZXh0ZW5kc0Vycm9yKGVycilcbiAgICAgICAgICAgID8gW2Vyci5uYW1lLCBlcnIubWVzc2FnZV1cbiAgICAgICAgICAgIDogW1wiRXJyb3JcIiwgSlNPTi5zdHJpbmdpZnkoZXJyKV07XG5cbiAgICAgICAgICBsb2dnZXIuaW5mbyhcbiAgICAgICAgICAgIGBBY3Rpdml0eSAke2FjdGl2aXR5SGFuZGxlfSBmYWlsZWQsIHJlcG9ydGluZyBmYWlsdXJlIGJhY2sgdG8gZXhlY3V0aW9uOiAke2Vycm9yfTogJHttZXNzYWdlfWBcbiAgICAgICAgICApO1xuXG4gICAgICAgICAgY29uc3QgZW5kVGltZSA9IGdldEVuZFRpbWUoc3RhcnQpO1xuICAgICAgICAgIGNvbnN0IGV2ZW50ID0gY3JlYXRlRXZlbnQ8QWN0aXZpdHlGYWlsZWQ+KFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICB0eXBlOiBXb3JrZmxvd0V2ZW50VHlwZS5BY3Rpdml0eUZhaWxlZCxcbiAgICAgICAgICAgICAgc2VxOiByZXF1ZXN0LmNvbW1hbmQuc2VxLFxuICAgICAgICAgICAgICBlcnJvcixcbiAgICAgICAgICAgICAgbWVzc2FnZSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBlbmRUaW1lXG4gICAgICAgICAgKTtcblxuICAgICAgICAgIGF3YWl0IGZpbmlzaEFjdGl2aXR5KFxuICAgICAgICAgICAgZXZlbnQsXG4gICAgICAgICAgICByZWNvcmRBZ2UgKyAoZW5kVGltZS5nZXRUaW1lKCkgLSBzdGFydC5nZXRUaW1lKCkpXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICBjbGVhckFjdGl2aXR5Q29udGV4dCgpO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gbG9nQWN0aXZpdHlDb21wbGV0ZU1ldHJpY3MoZmFpbGVkOiBib29sZWFuLCBkdXJhdGlvbjogbnVtYmVyKSB7XG4gICAgICAgICAgbWV0cmljcy5wdXRNZXRyaWMoXG4gICAgICAgICAgICBBY3Rpdml0eU1ldHJpY3MuQWN0aXZpdHlGYWlsZWQsXG4gICAgICAgICAgICBmYWlsZWQgPyAxIDogMCxcbiAgICAgICAgICAgIFVuaXQuQ291bnRcbiAgICAgICAgICApO1xuICAgICAgICAgIG1ldHJpY3MucHV0TWV0cmljKFxuICAgICAgICAgICAgQWN0aXZpdHlNZXRyaWNzLkFjdGl2aXR5Q29tcGxldGVkLFxuICAgICAgICAgICAgZmFpbGVkID8gMCA6IDEsXG4gICAgICAgICAgICBVbml0LkNvdW50XG4gICAgICAgICAgKTtcbiAgICAgICAgICAvLyBUaGUgdG90YWwgdGltZSBmcm9tIHRoZSBhY3Rpdml0eSBiZWluZyBzY2hlZHVsZWQgdW50aWwgaXQncyByZXN1bHQgaXMgc2VuZCB0byB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G93RXZlbnRUeXBlLkFjdGl2aXR5U3VjY2VlZGVkLFxuICAgICAgICAgICAgICBzZXE6IHJlcXVlc3QuY29tbWFuZC5zZXEsXG4gICAgICAgICAgICAgIHJlc3VsdCxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBlbmRUaW1lXG4gICAgICAgICAgKTtcblxuICAgICAgICAgIGF3YWl0IGZpbmlzaEFjdGl2aXR5KFxuICAgICAgICAgICAgZXZlbnQsXG4gICAgICAgICAgICByZWNvcmRBZ2UgKyAoZW5kVGltZS5nZXRUaW1lKCkgLSBzdGFydC5nZXRUaW1lKCkpXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgY29uc3QgW2Vycm9yLCBtZXNzYWdlXSA9IGV4dGVuZHNFcnJvcihlcnIpXG4gICAgICAgICAgICA/IFtlcnIubmFtZSwgZXJyLm1lc3NhZ2VdXG4gICAgICAgICAgICA6IFtcIkVycm9yXCIsIEpTT04uc3RyaW5naWZ5KGVycildO1xuXG4gICAgICAgICAgbG9nZ2VyLmluZm8oXG4gICAgICAgICAgICBgQWN0aXZpdHkgJHthY3Rpdml0eUhhbmRsZX0gZmFpbGVkLCByZXBvcnRpbmcgZmFpbHVyZSBiYWNrIHRvIGV4ZWN1dGlvbjogJHtlcnJvcn06ICR7bWVzc2FnZX1gXG4gICAgICAgICAgKTtcblxuICAgICAgICAgIGNvbnN0IGVuZFRpbWUgPSBnZXRFbmRUaW1lKHN0YXJ0KTtcbiAgICAgICAgICBjb25zdCBldmVudCA9IGNyZWF0ZUV2ZW50PEFjdGl2aXR5RmFpbGVkPihcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgdHlwZTogV29ya2Zsb3dFdmVudFR5cGUuQWN0aXZpdHlGYWlsZWQsXG4gICAgICAgICAgICAgIHNlcTogcmVxdWVzdC5jb21tYW5kLnNlcSxcbiAgICAgICAgICAgICAgZXJyb3IsXG4gICAgICAgICAgICAgIG1lc3NhZ2UsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZW5kVGltZVxuICAgICAgICAgICk7XG5cbiAgICAgICAgICBhd2FpdCBmaW5pc2hBY3Rpdml0eShcbiAgICAgICAgICAgIGV2ZW50LFxuICAgICAgICAgICAgcmVjb3JkQWdlICsgKGVuZFRpbWUuZ2V0VGltZSgpIC0gc3RhcnQuZ2V0VGltZSgpKVxuICAgICAgICAgICk7XG4gICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgY2xlYXJBY3Rpdml0eUNvbnRleHQoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIGxvZ0FjdGl2aXR5Q29tcGxldGVNZXRyaWNzKGZhaWxlZDogYm9vbGVhbiwgZHVyYXRpb246IG51bWJlcikge1xuICAgICAgICAgIG1ldHJpY3MucHV0TWV0cmljKFxuICAgICAgICAgICAgQWN0aXZpdHlNZXRyaWNzLkFjdGl2aXR5RmFpbGVkLFxuICAgICAgICAgICAgZmFpbGVkID8gMSA6IDAsXG4gICAgICAgICAgICBVbml0LkNvdW50XG4gICAgICAgICAgKTtcbiAgICAgICAgICBtZXRyaWNzLnB1dE1ldHJpYyhcbiAgICAgICAgICAgIEFjdGl2aXR5TWV0cmljcy5BY3Rpdml0eVN1Y2NlZWRlZCxcbiAgICAgICAgICAgIGZhaWxlZCA/IDAgOiAxLFxuICAgICAgICAgICAgVW5pdC5Db3VudFxuICAgICAgICAgICk7XG4gICAgICAgICAgLy8gVGhlIHRvdGFsIHRpbWUgZnJvbSB0aGUgYWN0aXZpdHkgYmVpbmcgc2NoZWR1bGVkIHVudGlsIGl0J3MgcmVzdWx0IGlzIHNlbmQgdG8gdGhlIHdvcmtmbG93LlxuICAgICAgICAgIG1ldHJpY3MucHV0TWV0cmljKEFjdGl2aXR5TWV0cmljcy5Ub3RhbER1cmF0aW9uLCBkdXJhdGlvbik7XG4gICAgICAgIH1cblxuICAgICAgICBhc3luYyBmdW5jdGlvbiBmaW5pc2hBY3Rpdml0eShcbiAgICAgICAgICBldmVudDogQWN0aXZpdHlTdWNjZWVkZWQgfCBBY3Rpdml0eUZhaWxlZCxcbiAgICAgICAgICBkdXJhdGlvbjogbnVtYmVyXG4gICAgICAgICkge1xuICAgICAgICAgIGF3YWl0IHRpbWVkKG1ldHJpY3MsIEFjdGl2aXR5TWV0cmljcy5TdWJtaXRXb3JrZmxvd1Rhc2tEdXJhdGlvbiwgKCkgPT5cbiAgICAgICAgICAgIHdvcmtmbG93Q2xpZW50LnN1Ym1pdFdvcmtmbG93VGFzayhyZXF1ZXN0LmV4ZWN1dGlvbklkLCBldmVudClcbiAgICAgICAgICApO1xuXG4gICAgICAgICAgbG9nQWN0aXZpdHlDb21wbGV0ZU1ldHJpY3MoaXNXb3JrZmxvd0ZhaWxlZChldmVudCksIGR1cmF0aW9uKTtcbiAgICAgICAgfVxuICAgICAgfVxuICApO1xufVxuIl19
import { inspect } from "util";
import { createEvent, getEventId, isHistoryEvent, isSleepCompleted, isWorkflowCompleted, isWorkflowFailed, isWorkflowStarted, WorkflowEventType, } from "../../workflow-events.js";
import { ExecutionStatus, isCompleteExecution, } from "../../execution.js";
import { createEvent, getEventId, isHistoryEvent, isSleepCompleted, isWorkflowSucceeded, isWorkflowFailed, isWorkflowStarted, WorkflowEventType, } from "../../workflow-events.js";
import { ExecutionStatus, isSucceededExecution, } from "../../execution.js";
import { isFailed, isResolved, isResult } from "../../result.js";

@@ -97,3 +97,3 @@ import { lookupWorkflow, progressWorkflow } from "../../workflow.js";

yield createEvent({
type: WorkflowEventType.WorkflowTaskStarted,
type: WorkflowEventType.WorkflowRunStarted,
}, start);

@@ -146,3 +146,3 @@ const workflowContext = {

yield createEvent({
type: WorkflowEventType.WorkflowTaskCompleted,
type: WorkflowEventType.WorkflowRunCompleted,
}, start);

@@ -162,3 +162,3 @@ if (isResult(result)) {

yield createEvent({
type: WorkflowEventType.WorkflowCompleted,
type: WorkflowEventType.WorkflowSucceeded,
output: result.value,

@@ -194,3 +194,3 @@ }, start);

}
if (isWorkflowCompleted(event) || isWorkflowFailed(event)) {
if (isWorkflowSucceeded(event) || isWorkflowFailed(event)) {
resultEvent = event;

@@ -252,4 +252,4 @@ }

}
else if (isWorkflowCompleted(resultEvent)) {
const execution = await timed(metrics, OrchestratorMetrics.ExecutionStatusUpdateDuration, () => workflowRuntimeClient.completeExecution({
else if (isWorkflowSucceeded(resultEvent)) {
const execution = await timed(metrics, OrchestratorMetrics.ExecutionStatusUpdateDuration, () => workflowRuntimeClient.succeedExecution({
executionId,

@@ -289,7 +289,7 @@ result: resultEvent.output,

function logExecutionCompleteMetrics(execution) {
metrics.putMetric(OrchestratorMetrics.ExecutionComplete, execution.status === ExecutionStatus.COMPLETE ? 1 : 0, Unit.Count);
metrics.putMetric(OrchestratorMetrics.ExecutionFailed, execution.status === ExecutionStatus.COMPLETE ? 0 : 1, Unit.Count);
metrics.putMetric(OrchestratorMetrics.ExecutionComplete, execution.status === ExecutionStatus.SUCCEEDED ? 1 : 0, Unit.Count);
metrics.putMetric(OrchestratorMetrics.ExecutionFailed, execution.status === ExecutionStatus.SUCCEEDED ? 0 : 1, Unit.Count);
metrics.putMetric(OrchestratorMetrics.ExecutionTotalDuration, new Date(execution.endTime).getTime() -
new Date(execution.startTime).getTime());
if (isCompleteExecution(execution)) {
if (isSucceededExecution(execution)) {
metrics.putMetric(OrchestratorMetrics.ExecutionResultBytes, execution.result ? JSON.stringify(execution.result).length : 0, Unit.Bytes);

@@ -310,2 +310,2 @@ }

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JjaGVzdHJhdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3J1bnRpbWUvaGFuZGxlcnMvb3JjaGVzdHJhdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxN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FN0YXJ0ZWREdXJhdGlvbixcbiAgICAgICAgICAgICAgKCkgPT5cbiAgICAgICAgICAgICAgICB0aW1lckNsaWVudC5zY2hlZHVsZUV2ZW50PFdvcmtmbG93VGltZWRPdXQ+KHtcbiAgICAgICAgICAgICAgICAgIHNjaGVkdWxlOiBTY2hlZHVsZS5hYnNvbHV0ZShuZXdXb3JrZmxvd1N0YXJ0LnRpbWVvdXRUaW1lISksXG4gICAgICAgICAgICAgICAgICBldmVudDogY3JlYXRlRXZlbnQ8V29ya2Zsb3dUaW1lZE91dD4oXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBXb3JrZmxvd0V2ZW50VHlwZS5Xb3JrZmxvd1RpbWVkT3V0LFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBzdGFydFxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgIGV4ZWN1dGlvbklkLFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBtZXRyaWNzLnNldFByb3BlcnR5KE9yY2hlc3RyYXRvck1ldHJpY3MuVGltZW91dFN0YXJ0ZWQsIDApO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHtcbiAgICAgICAgICByZXN1bHQsXG4gICAgICAgICAgY29tbWFuZHM6IG5ld0NvbW1hbmRzLFxuICAgICAgICAgIGhpc3Rvcnk6IHVwZGF0ZWRIaXN0b3J5RXZlbnRzLFxuICAgICAgICB9ID0gdGltZWRTeW5jKFxuICAgICAgICAgIG1ldHJpY3MsXG4gICAgICAgICAgT3JjaGVzdHJhdG9yTWV0cmljcy5BZHZhbmNlRXhlY3V0aW9uRHVyYXRpb24sXG4gICAgICAgICAgKCkgPT4ge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgcmV0dXJuIHByb2dyZXNzV29ya2Zsb3coXG4gICAgICAgICAgICAgICAgd29ya2Zsb3csXG4gICAgICAgICAgICAgICAgaGlzdG9yeSxcbiAgICAgICAgICAgICAgICBldmVudHMsXG4gICAgICAgICAgICAgICAgd29ya2Zsb3dDb250ZXh0LFxuICAgICAgICAgICAgICAgIGV4ZWN1dGlvbklkLFxuICAgICAgICAgICAgICAgIGJhc2VUaW1lXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJ3b3JrZmxvdyBlcnJvclwiKTtcbiAgICAgICAgICAgICAgZXhlY3V0aW9uTG9nZ2VyLmVycm9yKGluc3BlY3QoZXJyKSk7XG4gICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICk7XG5cbiAgICAgICAgbWV0cmljcy5zZXRQcm9wZXJ0eShcbiAgICAgICAgICBPcmNoZXN0cmF0b3JNZXRyaWNzLkFkdmFuY2VFeGVjdXRpb25FdmVudHMsXG4gICAgICAgICAgdXBkYXRlZEhpc3RvcnlFdmVudHMubGVuZ3RoXG4gICAgICAgICk7XG5cbiAgICAgICAgeWllbGQqIHVwZGF0ZWRIaXN0b3J5RXZlbnRzO1xuXG4gICAgICAgIGV4ZWN1dGlvbkxvZ2dlci5kZWJ1ZyhcbiAgICAgICAgICBcIldvcmtmbG93IHRlcm1pbmF0ZWQgd2l0aDogXCIgKyBKU09OLnN0cmluZ2lmeShyZXN1bHQpXG4gICAgICAgICk7XG5cbiAgICAgICAgZXhlY3V0aW9uTG9nZ2VyLmluZm8oYEZvdW5kICR7bmV3Q29tbWFuZHMubGVuZ3RofSBuZXcgY29tbWFuZHMuYCk7XG5cbiAgICAgICAgeWllbGQqIGF3YWl0IHRpbWVkKFxuICAgICAgICAgIG1ldHJpY3MsXG4gICAgICAgICAgT3JjaGVzdHJhdG9yTWV0cmljcy5JbnZva2VDb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Zmxvd1Rhc2tDb21wbGV0ZWQ+KFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHR5cGU6IFdvcmtmbG93RXZlbnRUeXBlLldvcmtmbG93VGFza0NvbXBsZXRlZCxcbiAgICAgICAgICB9LFxuICAgICAgICAgIHN0YXJ0XG4gICAgICAgICk7XG5cbiAgICAgICAgaWYgKGlzUmVzdWx0KHJlc3VsdCkpIHtcbiAgICAgICAgICBpZiAoaXNGYWlsZWQocmVzdWx0KSkge1xuICAgICAgICAgICAgY29uc3QgW2Vycm9yLCBtZXNzYWdlXSA9IGV4dGVuZHNFcnJvcihyZXN1bHQuZXJyb3IpXG4gICAgICAgICAgICAgID8gW3Jlc3VsdC5lcnJvci5uYW1lLCByZXN1bHQuZXJyb3IubWVzc2FnZV1cbiAgICAgICAgICAgICAgOiBbXCJFcnJvclwiLCBKU09OLnN0cmluZ2lmeShyZXN1bHQuZXJyb3IpXTtcbiAgICAgICAgICAgIHlpZWxkIGNyZWF0ZUV2ZW50PFdvcmtmbG93RmFpbGVkPihcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHR5cGU6IFdvcmtmbG93RXZlbnRUeXBlLldvcmtmbG93RmFpbGVkLFxuICAgICAgICAgICAgICAgIGVycm9yLFxuICAgICAgICAgICAgICAgIG1lc3NhZ2UsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHN0YXJ0XG4gICAgICAgICAgICApO1xuICAgICAgICAgIH0gZWxzZSBpZiAoaXNSZXNvbHZlZDxhbnk+KHJlc3VsdCkpIHtcbiAgICAgICAgICAgIHlpZWxkIGNyZWF0ZUV2ZW50PFdvcmtmbG93Q29tcGxldGVkPihcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHR5cGU6IFdvcmtmbG93RXZlbnRUeXBlLldvcmtmbG93Q29tcGxldGVkLFxuICAgICAgICAgICAgICAgIG91dHB1dDogcmVzdWx0LnZhbHVlLFxuICAgICAgICAgICAgICB9LFxuICAgIC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kKTtcblxuICAgICAgICAgIGlmIChuZXdXb3JrZmxvd1N0YXJ0Py50aW1lb3V0VGltZSkge1xuICAgICAgICAgICAgbWV0cmljcy5zZXRQcm9wZXJ0eShPcmNoZXN0cmF0b3JNZXRyaWNzLlRpbWVvdXRTdGFydGVkLCAxKTtcbiAgICAgICAgICAgIGF3YWl0IHRpbWVkKFxuICAgICAgICAgICAgICBtZXRyaWNzLFxuICAgICAgICAgICAgICBPcmNoZXN0cmF0b3JNZXRyaWNzLlRpbWVvdXRTdGFydGVkRHVyYXRpb24sXG4gICAgICAgICAgICAgICgpID0+XG4gICAgICAgICAgICAgICAgdGltZXJDbGllbnQuc2NoZWR1bGVFdmVudDxXb3JrZmxvd1RpbWVkT3V0Pih7XG4gICAgICAgICAgICAgICAgICBzY2hlZHVsZTogU2NoZWR1bGUuYWJzb2x1dGUobmV3V29ya2Zsb3dTdGFydC50aW1lb3V0VGltZSEpLFxuICAgICAgICAgICAgICAgICAgZXZlbnQ6IGNyZWF0ZUV2ZW50PFdvcmtmbG93VGltZWRPdXQ+KFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgdHlwZTogV29ya2Zsb3dFdmVudFR5cGUuV29ya2Zsb3dUaW1lZE91dCxcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgc3RhcnRcbiAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICBleGVjdXRpb25JZCxcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbWV0cmljcy5zZXRQcm9wZXJ0eShPcmNoZXN0cmF0b3JNZXRyaWNzLlRpbWVvdXRTdGFydGVkLCAwKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB7XG4gICAgICAgICAgcmVzdWx0LFxuICAgICAgICAgIGNvbW1hbmRzOiBuZXdDb21tYW5kcyxcbiAgICAgICAgICBoaXN0b3J5OiB1cGRhdGVkSGlzdG9yeUV2ZW50cyxcbiAgICAgICAgfSA9IHRpbWVkU3luYyhcbiAgICAgICAgICBtZXRyaWNzLFxuICAgICAgICAgIE9yY2hlc3RyYXRvck1ldHJpY3MuQWR2YW5jZUV4ZWN1dGlvbkR1cmF0aW9uLFxuICAgICAgICAgICgpID0+IHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHJldHVybiBwcm9ncmVzc1dvcmtmbG93KFxuICAgICAgICAgICAgICAgIHdvcmtmbG93LFxuICAgICAgICAgICAgICAgIGhpc3RvcnksXG4gICAgICAgICAgICAgICAgZXZlbnRzLFxuICAgICAgICAgICAgICAgIHdvcmtmbG93Q29udGV4dCxcbiAgICAgICAgICAgICAgICBleGVjdXRpb25JZCxcbiAgICAgICAgICAgICAgICBiYXNlVGltZVxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwid29ya2Zsb3cgZXJyb3JcIik7XG4gICAgICAgICAgICAgIGV4ZWN1dGlvbkxvZ2dlci5lcnJvcihpbnNwZWN0KGVycikpO1xuICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICApO1xuXG4gICAgICAgIG1ldHJpY3Muc2V0UHJvcGVydHkoXG4gICAgICAgICAgT3JjaGVzdHJhdG9yTWV0cmljcy5BZHZhbmNlRXhlY3V0aW9uRXZlbnRzLFxuICAgICAgICAgIHVwZGF0ZWRIaXN0b3J5RXZlbnRzLmxlbmd0aFxuICAgICAgICApO1xuXG4gICAgICAgIHlpZWxkKiB1cGRhdGVkSGlzdG9yeUV2ZW50cztcblxuICAgICAgICBleGVjdXRpb25Mb2dnZXIuZGVidWcoXG4gICAgICAgICAgXCJXb3JrZmxvdyB0ZXJtaW5hdGVkIHdpdGg6IFwiICsgSlNP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RHVyYXRpb24oTikpXG4gICAgICAgIG1ldHJpY3MucHV0TWV0cmljKFxuICAgICAgICAgIE9yY2hlc3RyYXRvck1ldHJpY3MuVGltZVRvQ29tbWFuZHNJbnZva2VkLFxuICAgICAgICAgIG1heFRhc2tBZ2UgKyAobmV3IERhdGUoKS5nZXRUaW1lKCkgLSBzdGFydC5nZXRUaW1lKCkpXG4gICAgICAgICk7XG5cbiAgICAgICAgeWllbGQgY3JlYXRlRXZlbnQ8V29ya2Zsb3dSdW5Db21wbGV0ZWQ+KFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHR5cGU6IFdvcmtmbG93RXZlbnRUeXBlLldvcmtmbG93UnVuQ29tcGxldGVkLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgc3RhcnRcbiAgICAgICAgKTtcblxuICAgICAgICBpZiAoaXNSZXN1bHQocmVzdWx0KSkge1xuICAgICAgICAgIGlmIChpc0ZhaWxlZChyZXN1bHQpKSB7XG4gICAgICAgICAgICBjb25zdCBbZXJyb3IsIG1lc3NhZ2VdID0gZXh0ZW5kc0Vycm9yKHJlc3VsdC5lcnJvcilcbiAgICAgICAgICAgICAgPyBbcmVzdWx0LmVycm9yLm5hbWUsIHJlc3VsdC5lcnJvci5tZXNzYWdlXVxuICAgICAgICAgICAgICA6IFtcIkVycm9yXCIsIEpTT04uc3RyaW5naWZ5KHJlc3VsdC5lcnJvcildO1xuICAgICAgICAgICAgeWllbGQgY3JlYXRlRXZlbnQ8V29ya2Zsb3dGYWlsZWQ+KFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdHlwZTogV29ya2Zsb3dFdmVudFR5cGUuV29ya2Zsb3dGYWlsZWQsXG4gICAgICAgICAgICAgICAgZXJyb3IsXG4gICAgICAgICAgICAgICAgbWVzc2FnZSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgc3RhcnRcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfSBlbHNlIGlmIChpc1Jlc29sdmVkPGFueT4ocmVzdWx0KSkge1xuICAgICAgICAgICAgeWllbGQgY3JlYXRlRXZlbnQ8V29ya2Zsb3dTdWNjZWVkZWQ+KFxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdHlwZTogV29ya2Zsb3dFdmVudFR5cGUuV29ya2Zsb3dTdWNjZWVkZWQsXG4gICAgICAgICAgICAgICAgb3V0cHV0OiByZXN1bHQudmFsdWUsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHN0YXJ0XG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICB9XG5cbiAgICAgIC8qKlxuICAgICAgICogUGFydGl0aW9ucyB0aGUgZXZlbnRzIG91dHB1dCBieSB0aGUgd29ya2Zsb3cuXG4gICAgICAgKlxuICAgICAgICogV2UgbmVlZCB0d28gZGlmZmVyZW50IGNvbGxlY3Rpb24gb2YgZXZlbnRzLlxuICAgICAgICpcbiAgICAgICAqIEhpc3RvcnkgRXZlbnRzIC0gdGhlc2UgYXJlIHRoZSBldmVudHMgdGhhdCB3b3JrZmxvdyB1c2VzIHRvIG1haW50YWluIHN0YXRlLlxuICAgICAgICogICAgICAgICAgICAgICAgICBlYWNoIHJ1biBvZiB0aGUgd29ya2Zsb3cgd2UgbWF5IGZpbHRlciBvciBhZGQgZXZlbnRzIHRvIHRoaXMgY29sbGVjdGlvbi5cbiAgICAgICAqICAgICAgICAgICAgICAgICAgdGhlc2UgZXZlbnRzIHdpbGwgYmUgcGVyc2lzdGVkIGZvciB0aGUgbmV4dCBydW4uXG4gICAgICAgKiBXb3JrZmxvdyBFdmVudHMgLSB0aGVzZSBhcmUgZmluZWQgZ3JhaW5lZCBldmVudHMgZW1pdHRlZCBieSB0aGUgd29ya2Zsb3cuIFRoZXkgZHJpdmUgVUlzLFxuICAgICAgICogICAgICAgICAgICAgICAgICAgdmlzdWFsaXphdGlvbiBhbmQgZGVid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CkuZ2V0VGltZSgpXG4gICAgKTtcbiAgICBjb25zdCBhdmcgPVxuICAgICAgc2xlZXBDb21wbGV0ZWRWYXJpYW5jZS5yZWR1Y2UoKHQsIG4pID0+IHQgKyBuLCAwKSAvXG4gICAgICBzbGVlcENvbXBsZXRlZFZhcmlhbmNlLmxlbmd0aDtcbiAgICBtZXRyaWNzLnNldFByb3BlcnR5KE9yY2hlc3RyYXRvck1ldHJpY3MuU2xlZXBWYXJpYW5jZU1pbGxpcywgYXZnKTtcbiAgfVxufVxuIl19

@@ -153,3 +153,3 @@ export declare namespace MetricsCommon {

*/
const ActivityCompleted = "ActivityCompleted";
const ActivitySucceeded = "ActivitySucceeded";
/**

@@ -156,0 +156,0 @@ * The total duration of the activity after being scheduled, including the time

@@ -157,3 +157,3 @@ /* eslint-disable @typescript-eslint/no-namespace */

*/
ActivityMetrics.ActivityCompleted = "ActivityCompleted";
ActivityMetrics.ActivitySucceeded = "ActivitySucceeded";
/**

@@ -180,2 +180,2 @@ * The total duration of the activity after being scheduled, including the time

})(SchedulerForwarderMetrics || (SchedulerForwarderMetrics = {}));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3J1bnRpbWUvbWV0cmljcy9jb25zdGFudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsb0RBQW9EO0FBQ3BELE1BQU0sS0FBVyxhQUFhLENBRzdCO0FBSEQsV0FBaUIsYUFBYTtJQUNmLCtCQUFpQixHQUFHLFVBQVUsQ0FBQztJQUMvQixtQ0FBcUIsR0FBRyxjQUFjLENBQUM7QUFDdEQsQ0FBQyxFQUhnQixhQUFhLEtBQWIsYUFBYSxRQUc3QjtBQUVELE1BQU0sS0FBVyxtQkFBbUIsQ0EyR25DO0FBM0dELFdBQWlCLG1CQUFtQjtJQUNsQzs7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lnZ2VyIHRpbWUgYW5kIHRoZSBTY2hlZHVsZXIgRm9yd2FyZGVyIHNlZWluZyB0aGUgbWVzc2FnZS5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBTY2hlZHVsZXJUaW1lRGVsYXkgPSBcIlNjaGVkdWxlclRpbWVEZWxheVwiO1xuICAvKipcbiAgICogU2Vjb25kcyB0aGUgdGltZXIgcXVldWUgaXMgdG9sZCB0byB3YWl0IHVudGlsIGhhbmRsaW5nIHRoZSByZXF1ZXN0LlxuICAgKi9cbiAgZXhwb3J0IGNvbnN0IFRpbWVyUXVldWVEZWxheVNlY29uZHMgPSBcIlRpbWVyUXVldWVEZWxheVNlY29uZHNcIjtcbn1cbiJdfQ==

@@ -50,3 +50,3 @@ import { EventEnvelope } from "./event.js";

/**
* Successfully Completes an async activity with the given value.
* Succeeds an async activity with the given value.
*/

@@ -66,2 +66,5 @@ sendActivitySuccess(request: Omit<SendActivitySuccessRequest, "type">): Promise<void>;

export interface StartExecutionResponse {
/**
* ID of the started workflow execution.
*/
executionId: string;

@@ -68,0 +71,0 @@ }

@@ -16,2 +16,2 @@ export var ActivityUpdateType;

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS1jbGllbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2VydmljZS1jbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMEtBLE1BQU0sQ0FBTixJQUFZLGtCQUlYO0FBSkQsV0FBWSxrQkFBa0I7SUFDNUIseUNBQW1CLENBQUE7SUFDbkIseUNBQW1CLENBQUE7SUFDbkIsNkNBQXVCLENBQUE7QUFDekIsQ0FBQyxFQUpXLGtCQUFrQixLQUFsQixrQkFBa0IsUUFJN0I7QUF5QkQsTUFBTSxVQUFVLDRCQUE0QixDQUMxQyxPQUE4QjtJQUU5QixPQUFPLE9BQU8sQ0FBQyxJQUFJLEtBQUssa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G4gIC8qKlxuICAgKiBUcnVlIHdoZW4gdGhlIGFjdGl2aXR5IGhhcyBiZWVuIGNhbmNlbGxlZC5cbiAgICpcbiAgICogVGhpcyBpcyB0aGUgb25seSB3YXkgZm9yIGEgbG9uZyBydW5uaW5nIGFjdGl2aXR5IHRvIGtub3cgaXQgd2FzIGNhbmNlbGxlZC5cbiAgICovXG4gIGNhbmNlbGxlZDogYm9vbGVhbjtcbn1cbiJdfQ==

@@ -29,3 +29,3 @@ /**

* let done = false;
* mySignal.on(async () => {
* mySignal.onSignal(async () => {
* await sleepFor(10);

@@ -42,3 +42,3 @@ * done = true;

* ```ts
* const handler = mySignal.on(() => {});
* const handler = mySignal.onSignal(() => {});
*

@@ -50,3 +50,3 @@ * await sleepFor(10);

*/
on(handler: SignalHandlerFunction<Payload>): SignalsHandler;
onSignal(handler: SignalHandlerFunction<Payload>): SignalsHandler;
/**

@@ -60,3 +60,3 @@ * Waits for a signal to be received by the workflow.

* workflow("wf", async () => {
* const payload = await mySignal.expect();
* const payload = await mySignal.expectSignal();
*

@@ -74,3 +74,3 @@ * return payload;

* try {
* const payload = await mySignal.expect({ timeoutSecond: 10 * 60 });
* const payload = await mySignal.expectSignal({ timeoutSecond: 10 * 60 });
*

@@ -84,3 +84,3 @@ * return payload;

*/
expect(opts?: ExpectSignalOptions): Promise<Payload>;
expectSignal(opts?: ExpectSignalOptions): Promise<Payload>;
/**

@@ -92,7 +92,7 @@ * Allows a {@link workflow} to send this signal to any workflow {@link Execution} by executionId.

* workflow("wf", async () => {
* mySignal.send("payload");
* mySignal.sendSignal("payload");
* })
* ```
*/
send(executionId: string, ...args: SendSignalProps<Payload>): Promise<void>;
sendSignal(executionId: string, ...args: SendSignalProps<Payload>): Promise<void>;
}

@@ -124,4 +124,3 @@ export type SignalPayload<E extends Signal<any>> = E extends Signal<infer P> ? P : never;

*/
export declare function expectSignal<SignalPayload = any>(signalId: string, opts?: ExpectSignalOptions): Promise<SignalPayload>;
export declare function expectSignal<E extends Signal<any>>(signal: E, opts?: ExpectSignalOptions): Promise<SignalPayload<E>>;
export declare function expectSignal<SignalPayload = any>(signal: Signal<SignalPayload> | string, opts?: ExpectSignalOptions): Promise<SignalPayload>;
/**

@@ -156,5 +155,4 @@ * Listens for a signal matching the signalId provided.

*/
export declare function onSignal<E extends Signal<any>>(signal: E, handler: SignalHandlerFunction<SignalPayload<E>>): SignalsHandler;
export declare function onSignal<Payload = void>(signalId: string, handler: SignalHandlerFunction<Payload>): SignalsHandler;
export type SendSignalProps<SignalPayload> = [SignalPayload] extends [undefined] | [void] ? [id?: string] : [payload: SignalPayload, id?: string];
export declare function onSignal<Payload>(signal: Signal<Payload> | string, handler: SignalHandlerFunction<Payload>): SignalsHandler;
export type SendSignalProps<SignalPayload> = [SignalPayload] extends [undefined] | [void] ? [] : [payload: SignalPayload];
/**

@@ -173,4 +171,3 @@ * Allows a {@link workflow} to send a signal to any workflow {@link Execution} by executionId.

*/
export declare function sendSignal<S extends Signal<any>>(executionId: string, signal: S, ...args: SendSignalProps<SignalPayload<S>>): Promise<void>;
export declare function sendSignal<Payload = any>(executionId: string, signalId: string, ...args: SendSignalProps<Payload>): Promise<void>;
export declare function sendSignal<Payload = any>(executionId: string, signal: string | Signal<Payload>, ...args: SendSignalProps<Payload>): Promise<void>;
export type SignalTarget = ExecutionTarget | ChildExecutionTarget;

@@ -177,0 +174,0 @@ export declare enum SignalTargetType {

@@ -26,3 +26,3 @@ import { createSendSignalCall } from "./calls/send-signal-call.js";

* let done = false;
* mySignal.on(async () => {
* mySignal.onSignal(async () => {
* await sleepFor(10);

@@ -39,3 +39,3 @@ * done = true;

* ```ts
* const handler = mySignal.on(() => {});
* const handler = mySignal.onSignal(() => {});
*

@@ -47,3 +47,3 @@ * await sleepFor(10);

*/
on(handler) {
onSignal(handler) {
return onSignal(this, handler);

@@ -59,3 +59,3 @@ }

* workflow("wf", async () => {
* const payload = await mySignal.expect();
* const payload = await mySignal.expectSignal();
*

@@ -73,3 +73,3 @@ * return payload;

* try {
* const payload = await mySignal.expect({ timeoutSecond: 10 * 60 });
* const payload = await mySignal.expectSignal({ timeoutSecond: 10 * 60 });
*

@@ -83,3 +83,3 @@ * return payload;

*/
expect(opts) {
expectSignal(opts) {
return expectSignal(this, opts);

@@ -93,10 +93,26 @@ }

* workflow("wf", async () => {
* mySignal.send("payload");
* mySignal.sendSignal("payload");
* })
* ```
*/
send(executionId, ...args) {
sendSignal(executionId, ...args) {
return sendSignal(executionId, this, ...args);
}
}
/**
* Waits for a signal to be received by the workflow.
*
* The first signal received will resolve the Promise with the payload of the promise.
*
* ```ts
* workflow("wf", () => {
* const payload = await expectSignal("MySignal");
*
* return payload;
* });
* ```
*
* Use `opts.timeoutSeconds` to stop waiting after the provided time. The Promise will reject
* when the provided time has elapsed.
*/
export function expectSignal(signal, opts) {

@@ -108,2 +124,31 @@ if (!isOrchestratorWorker()) {

}
/**
* Listens for a signal matching the signalId provided.
*
* When the signal is received, the handler is invoked.
* If the handler return a promise, the handler is added as a {@link Chain}
* and progressed until completion.
*
* ```ts
* workflow("wf", () => {
* let done = false;
* onSignal("MySignal", async () => {
* await sleepFor(10);
* done = true;
* });
*
* await condition(() => done);
* });
* ```
*
* To remove the handler, call the dispose method.
*
* ```ts
* const handler = onSignal("MySignal", () => {});
*
* await sleepFor(10);
*
* handler.dispose();
* ```
*/
export function onSignal(signal, handler) {

@@ -115,3 +160,17 @@ if (!isOrchestratorWorker()) {

}
export function sendSignal(executionId, signal, payload, id) {
/**
* Allows a {@link workflow} to send a signal to any workflow {@link Execution} by executionId.
*
* ```ts
* const mySignal = signal<string>("MySignal");
* workflow("wf", async () => {
* sendSignal("mySignal", "payload");
* sendSignal(mySignal, "payload");
* })
* ```
*
* @param id an optional, execution unique ID, will be used to de-dupe the signal at the target execution.
*/
export function sendSignal(executionId, signal, ...args) {
const [payload] = args;
if (isOrchestratorWorker()) {

@@ -124,3 +183,3 @@ return createSendSignalCall({ type: SignalTargetType.Execution, executionId }, typeof signal === "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duYWxUYXJnZXRUeXBlLkV4ZWN1dGlvbjtcbiAgZXhlY3V0aW9uSWQ6IHN0cmluZztcbn1cblxuZXhwb3J0IGludGVyZmFjZSBDaGlsZEV4ZWN1dGlvblRhcmdldCB7XG4gIHR5cGU6IFNpZ25hbFRhcmdldFR5cGUuQ2hpbGRFeGVjdXRpb247XG4gIHdvcmtmbG93TmFtZTogc3RyaW5nO1xuICBzZXE6IG51bWJlcjtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGlzQ2hpbGRFeGVjdXRpb25UYXJnZXQoXG4gIHRhcmdldDogU2lnbmFsVGFyZ2V0XG4pOiB0YXJnZXQgaXMgQ2hpbGRFeGVjdXRpb25UYXJnZXQge1xuICByZXR1cm4gdGFyZ2V0LnR5cGUgPT09IFNpZ25hbFRhcmdldFR5cGUuQ2hpbGRFeGVjdXRpb247XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBpc0V4ZWN1dGlvblRhcmdldChcbiAgdGFyZ2V0OiBTaWduYWxUYXJnZXRcbik6IHRhcmdldCBpcyBFeGVjdXRpb25UYXJnZXQge1xuICByZXR1cm4gdGFyZ2V0LnR5cGUgPT09IFNpZ25hbFRhcmdldFR5cGUuRXhlY3V0aW9uO1xufVxuIl19

@@ -15,3 +15,3 @@ import { ExecutionContext } from "./context.js";

export declare enum WorkflowEventType {
ActivityCompleted = "ActivityCompleted",
ActivitySucceeded = "ActivitySucceeded",
ActivityFailed = "ActivityFailed",

@@ -21,3 +21,3 @@ ActivityHeartbeatTimedOut = "ActivityHeartbeatTimedOut",

ActivityTimedOut = "ActivityTimedOut",
ChildWorkflowCompleted = "ChildWorkflowCompleted",
ChildWorkflowSucceeded = "ChildWorkflowSucceeded",
ChildWorkflowFailed = "ChildWorkflowFailed",

@@ -34,7 +34,7 @@ ChildWorkflowScheduled = "ChildWorkflowScheduled",

SleepScheduled = "SleepScheduled",
WorkflowCompleted = "WorkflowCompleted",
WorkflowSucceeded = "WorkflowSucceeded",
WorkflowFailed = "WorkflowFailed",
WorkflowStarted = "WorkflowStarted",
WorkflowTaskCompleted = "TaskCompleted",
WorkflowTaskStarted = "TaskStarted",
WorkflowRunCompleted = "WorkflowRunCompleted",
WorkflowRunStarted = "WorkflowRunStarted",
WorkflowTimedOut = "WorkflowTimedOut"

@@ -45,5 +45,5 @@ }

*/
export type WorkflowEvent = HistoryEvent | WorkflowTaskCompleted | WorkflowTaskStarted | WorkflowCompleted | WorkflowFailed | WorkflowStarted;
export type WorkflowEvent = HistoryEvent | WorkflowRunCompleted | WorkflowRunStarted | WorkflowSucceeded | WorkflowFailed | WorkflowStarted;
export type ScheduledEvent = ActivityScheduled | ChildWorkflowScheduled | ConditionStarted | EventsPublished | ExpectSignalStarted | SignalSent | SleepScheduled;
export type CompletedEvent = ActivityCompleted | ChildWorkflowCompleted | SleepCompleted;
export type SucceededEvent = ActivitySucceeded | ChildWorkflowSucceeded | SleepCompleted;
export type FailedEvent = ActivityFailed | ActivityHeartbeatTimedOut | ActivityTimedOut | ChildWorkflowFailed | ConditionTimedOut | ExpectSignalTimedOut;

@@ -53,3 +53,3 @@ /**

*/
export type HistoryEvent = CompletedEvent | FailedEvent | ScheduledEvent | SignalReceived | WorkflowTimedOut;
export type HistoryEvent = SucceededEvent | FailedEvent | ScheduledEvent | SignalReceived | WorkflowTimedOut;
export declare function isHistoryEvent(event: WorkflowEvent): event is HistoryEvent;

@@ -76,4 +76,4 @@ /**

}
export interface WorkflowTaskStarted extends BaseEvent {
type: WorkflowEventType.WorkflowTaskStarted;
export interface WorkflowRunStarted extends BaseEvent {
type: WorkflowEventType.WorkflowRunStarted;
/**

@@ -89,4 +89,4 @@ * An execution ID of the parent workflow execution that

}
export interface ActivityCompleted extends HistoryEventBase {
type: WorkflowEventType.ActivityCompleted;
export interface ActivitySucceeded extends HistoryEventBase {
type: WorkflowEventType.ActivitySucceeded;
result: any;

@@ -102,7 +102,7 @@ }

}
export interface WorkflowTaskCompleted extends BaseEvent {
type: WorkflowEventType.WorkflowTaskCompleted;
export interface WorkflowRunCompleted extends BaseEvent {
type: WorkflowEventType.WorkflowRunCompleted;
}
export interface WorkflowCompleted extends BaseEvent {
type: WorkflowEventType.WorkflowCompleted;
export interface WorkflowSucceeded extends BaseEvent {
type: WorkflowEventType.WorkflowSucceeded;
output: any;

@@ -120,4 +120,4 @@ }

}
export interface ChildWorkflowCompleted extends HistoryEventBase {
type: WorkflowEventType.ChildWorkflowCompleted;
export interface ChildWorkflowSucceeded extends HistoryEventBase {
type: WorkflowEventType.ChildWorkflowSucceeded;
result: any;

@@ -131,5 +131,5 @@ }

export declare function isWorkflowStarted(event: WorkflowEvent): event is WorkflowStarted;
export declare function isTaskStarted(event: WorkflowEvent): event is WorkflowTaskStarted;
export declare function isWorkflowRunStarted(event: WorkflowEvent): event is WorkflowRunStarted;
export declare function isActivityScheduled(event: WorkflowEvent): event is ActivityScheduled;
export declare function isActivityCompleted(event: WorkflowEvent): event is ActivityCompleted;
export declare function isActivitySucceeded(event: WorkflowEvent): event is ActivitySucceeded;
export declare function isActivityFailed(event: WorkflowEvent): event is ActivityFailed;

@@ -146,7 +146,7 @@ export declare function isActivityHeartbeatTimedOut(event: WorkflowEvent): event is ActivityHeartbeatTimedOut;

}
export declare function isTaskCompleted(event: WorkflowEvent): event is WorkflowTaskCompleted;
export declare function isWorkflowCompleted(event: WorkflowEvent): event is WorkflowCompleted;
export declare function isWorkflowRunCompleted(event: WorkflowEvent): event is WorkflowRunCompleted;
export declare function isWorkflowSucceeded(event: WorkflowEvent): event is WorkflowSucceeded;
export declare function isWorkflowFailed(event: WorkflowEvent): event is WorkflowFailed;
export declare function isChildWorkflowScheduled(event: WorkflowEvent): event is ChildWorkflowScheduled;
export declare function isChildWorkflowCompleted(event: WorkflowEvent): event is ChildWorkflowCompleted;
export declare function isChildWorkflowSucceeded(event: WorkflowEvent): event is ChildWorkflowSucceeded;
export declare function isChildWorkflowFailed(event: WorkflowEvent): event is ChildWorkflowFailed;

@@ -200,3 +200,3 @@ export declare function isSleepCompleted(event: WorkflowEvent): event is SleepCompleted;

export declare const isScheduledEvent: (a: any) => a is ActivityScheduled | ChildWorkflowScheduled | ConditionStarted | EventsPublished | ExpectSignalStarted | SignalSent | SleepScheduled;
export declare const isCompletedEvent: (a: any) => a is ActivityCompleted | ChildWorkflowCompleted | SleepCompleted;
export declare const isSucceededEvent: (a: any) => a is ActivitySucceeded | ChildWorkflowSucceeded | SleepCompleted;
export declare const isFailedEvent: (a: any) => a is ActivityFailed | ActivityHeartbeatTimedOut | ActivityTimedOut | ChildWorkflowFailed | ConditionTimedOut | ExpectSignalTimedOut | WorkflowTimedOut;

@@ -203,0 +203,0 @@ export declare function assertEventType<T extends WorkflowEvent>(event: any, type: T["type"]): asserts event is T;

@@ -5,3 +5,3 @@ import { ulid } from "ulidx";

(function (WorkflowEventType) {
WorkflowEventType["ActivityCompleted"] = "ActivityCompleted";
WorkflowEventType["ActivitySucceeded"] = "ActivitySucceeded";
WorkflowEventType["ActivityFailed"] = "ActivityFailed";

@@ -11,3 +11,3 @@ WorkflowEventType["ActivityHeartbeatTimedOut"] = "ActivityHeartbeatTimedOut";

WorkflowEventType["ActivityTimedOut"] = "ActivityTimedOut";
WorkflowEventType["ChildWorkflowCompleted"] = "ChildWorkflowCompleted";
WorkflowEventType["ChildWorkflowSucceeded"] = "ChildWorkflowSucceeded";
WorkflowEventType["ChildWorkflowFailed"] = "ChildWorkflowFailed";

@@ -24,11 +24,11 @@ WorkflowEventType["ChildWorkflowScheduled"] = "ChildWorkflowScheduled";

WorkflowEventType["SleepScheduled"] = "SleepScheduled";
WorkflowEventType["WorkflowCompleted"] = "WorkflowCompleted";
WorkflowEventType["WorkflowSucceeded"] = "WorkflowSucceeded";
WorkflowEventType["WorkflowFailed"] = "WorkflowFailed";
WorkflowEventType["WorkflowStarted"] = "WorkflowStarted";
WorkflowEventType["WorkflowTaskCompleted"] = "TaskCompleted";
WorkflowEventType["WorkflowTaskStarted"] = "TaskStarted";
WorkflowEventType["WorkflowRunCompleted"] = "WorkflowRunCompleted";
WorkflowEventType["WorkflowRunStarted"] = "WorkflowRunStarted";
WorkflowEventType["WorkflowTimedOut"] = "WorkflowTimedOut";
})(WorkflowEventType || (WorkflowEventType = {}));
export function isHistoryEvent(event) {
return (isCompletedEvent(event) ||
return (isSucceededEvent(event) ||
isFailedEvent(event) ||

@@ -42,4 +42,4 @@ isScheduledEvent(event) ||

}
export function isTaskStarted(event) {
return event.type === WorkflowEventType.WorkflowTaskStarted;
export function isWorkflowRunStarted(event) {
return event.type === WorkflowEventType.WorkflowRunStarted;
}

@@ -49,4 +49,4 @@ export function isActivityScheduled(event) {

}
export function isActivityCompleted(event) {
return event.type === WorkflowEventType.ActivityCompleted;
export function isActivitySucceeded(event) {
return event.type === WorkflowEventType.ActivitySucceeded;
}

@@ -62,7 +62,7 @@ export function isActivityFailed(event) {

}
export function isTaskCompleted(event) {
return event.type === WorkflowEventType.WorkflowTaskCompleted;
export function isWorkflowRunCompleted(event) {
return event.type === WorkflowEventType.WorkflowRunCompleted;
}
export function isWorkflowCompleted(event) {
return event.type === WorkflowEventType.WorkflowCompleted;
export function isWorkflowSucceeded(event) {
return event.type === WorkflowEventType.WorkflowSucceeded;
}

@@ -75,4 +75,4 @@ export function isWorkflowFailed(event) {

}
export function isChildWorkflowCompleted(event) {
return event.type === WorkflowEventType.ChildWorkflowCompleted;
export function isChildWorkflowSucceeded(event) {
return event.type === WorkflowEventType.ChildWorkflowSucceeded;
}

@@ -113,3 +113,3 @@ export function isChildWorkflowFailed(event) {

export const isScheduledEvent = or(isActivityScheduled, isChildWorkflowScheduled, isConditionStarted, isEventsPublished, isExpectSignalStarted, isSignalSent, isSleepScheduled);
export const isCompletedEvent = or(isActivityCompleted, isChildWorkflowCompleted, isSleepCompleted);
export const isSucceededEvent = or(isActivitySucceeded, isChildWorkflowSucceeded, isSleepCompleted);
export const isFailedEvent = or(isActivityFailed, isActivityTimedOut, isActivityHeartbeatTimedOut, isChildWorkflowFailed, isCondition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TtcbiAgfSk7XG59XG5cbnR5cGUgVW5yZXNvbHZlZEV2ZW50PFQgZXh0ZW5kcyBXb3JrZmxvd0V2ZW50PiA9IE9taXQ8VCwgXCJpZFwiIHwgXCJ0aW1lc3RhbXBcIj47XG5cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVFdmVudDxUIGV4dGVuZHMgV29ya2Zsb3dFdmVudD4oXG4gIGV2ZW50OiBVbnJlc29sdmVkRXZlbnQ8VD4sXG4gIHRpbWU6IERhdGUsXG4gIGlkOiBzdHJpbmcgPSB1bGlkKClcbik6IFQge1xuICBjb25zdCB0aW1lc3RhbXAgPSB0aW1lLnRvSVNPU3RyaW5nKCk7XG5cbiAgLy8gaGlzdG9yeSBldmVudHMgZG8gbm90IGhhdmUgSURzLCB1c2UgZ2V0RXZlbnRJZFxuICBpZiAoXG4gICAgaXNIaXN0b3J5RXZlbnQoZXZlbnQgYXMgdW5rbm93biBhcyBXb3JrZmxvd0V2ZW50KSAmJlxuICAgICFpc1NpZ25hbFJlY2VpdmVkKGV2ZW50IGFzIHVua25vd24gYXMgV29ya2Zsb3dFdmVudClcbiAgKSB7XG4gICAgcmV0dXJuIHsgLi4uKGV2ZW50IGFzIGFueSksIHRpbWVzdGFtcCB9O1xuICB9XG5cbiAgcmV0dXJuIHsgLi4uZXZlbnQsIGlkLCB0aW1lc3RhbXAgfSBhcyBUO1xufVxuIl19
{
"name": "@eventual/core",
"version": "0.5.1",
"version": "0.5.2",
"exports": {

@@ -5,0 +5,0 @@ ".": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc