@aikirun/types 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/client.d.ts +1 -1
- package/dist/duration.d.ts +2 -2
- package/dist/event.d.ts +12 -9
- package/dist/serializable.d.ts +11 -0
- package/dist/sleep.d.ts +9 -17
- package/dist/task.d.ts +58 -10
- package/dist/task.js +3 -3
- package/dist/utils.d.ts +2 -2
- package/dist/validator.d.ts +5 -0
- package/dist/validator.js +0 -0
- package/dist/worker.d.ts +8 -0
- package/dist/worker.js +0 -0
- package/dist/workflow-run-api.d.ts +55 -32
- package/dist/workflow-run.d.ts +61 -20
- package/dist/workflow-run.js +32 -5
- package/dist/workflow.d.ts +4 -4
- package/package.json +34 -26
- package/dist/error.d.ts +0 -11
- /package/dist/{error.js → serializable.js} +0 -0
package/README.md
CHANGED
package/dist/client.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { WorkflowMeta } from './workflow.js';
|
|
|
2
2
|
import { WorkflowRun, WorkflowRunId } from './workflow-run.js';
|
|
3
3
|
import { WorkflowRunApi } from './workflow-run-api.js';
|
|
4
4
|
import { INTERNAL } from './symbols.js';
|
|
5
|
-
import './error.js';
|
|
6
5
|
import './event.js';
|
|
7
6
|
import './duration.js';
|
|
8
7
|
import './utils.js';
|
|
9
8
|
import './retry.js';
|
|
9
|
+
import './serializable.js';
|
|
10
10
|
import './sleep.js';
|
|
11
11
|
import './task.js';
|
|
12
12
|
import './trigger.js';
|
package/dist/duration.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RequireAtLeastOneProp } from './utils.js';
|
|
2
2
|
|
|
3
3
|
interface DurationFields {
|
|
4
4
|
days?: number;
|
|
@@ -7,7 +7,7 @@ interface DurationFields {
|
|
|
7
7
|
seconds?: number;
|
|
8
8
|
milliseconds?: number;
|
|
9
9
|
}
|
|
10
|
-
type DurationObject =
|
|
10
|
+
type DurationObject = RequireAtLeastOneProp<DurationFields>;
|
|
11
11
|
type DurationMs = number;
|
|
12
12
|
type Duration = DurationMs | DurationObject;
|
|
13
13
|
|
package/dist/event.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DurationObject } from './duration.js';
|
|
2
2
|
import './utils.js';
|
|
3
3
|
|
|
4
|
-
type
|
|
5
|
-
_brand: "
|
|
4
|
+
type EventName = string & {
|
|
5
|
+
_brand: "event_name";
|
|
6
6
|
};
|
|
7
7
|
type EventStatus = "received" | "timeout";
|
|
8
8
|
interface EventStateBase {
|
|
@@ -12,18 +12,18 @@ interface EventStateReceived<Data> extends EventStateBase {
|
|
|
12
12
|
status: "received";
|
|
13
13
|
data: Data;
|
|
14
14
|
receivedAt: number;
|
|
15
|
-
|
|
15
|
+
reference?: EventReferenceOptions;
|
|
16
16
|
}
|
|
17
|
-
interface
|
|
17
|
+
interface EventStateTimeout extends EventStateBase {
|
|
18
18
|
status: "timeout";
|
|
19
19
|
timedOutAt: number;
|
|
20
20
|
}
|
|
21
|
-
type EventState<Data> = EventStateReceived<Data> |
|
|
21
|
+
type EventState<Data> = EventStateReceived<Data> | EventStateTimeout;
|
|
22
22
|
interface EventQueue<Data> {
|
|
23
23
|
events: EventState<Data>[];
|
|
24
24
|
}
|
|
25
|
-
interface EventWaitOptions<
|
|
26
|
-
timeout?:
|
|
25
|
+
interface EventWaitOptions<Timed extends boolean> {
|
|
26
|
+
timeout?: Timed extends true ? DurationObject : never;
|
|
27
27
|
}
|
|
28
28
|
type EventWaitState<Data, Timed extends boolean> = Timed extends false ? {
|
|
29
29
|
data: Data;
|
|
@@ -34,7 +34,10 @@ type EventWaitState<Data, Timed extends boolean> = Timed extends false ? {
|
|
|
34
34
|
timeout: true;
|
|
35
35
|
};
|
|
36
36
|
interface EventSendOptions {
|
|
37
|
-
|
|
37
|
+
reference?: EventReferenceOptions;
|
|
38
|
+
}
|
|
39
|
+
interface EventReferenceOptions {
|
|
40
|
+
id: string;
|
|
38
41
|
}
|
|
39
42
|
|
|
40
|
-
export type {
|
|
43
|
+
export type { EventName, EventQueue, EventReferenceOptions, EventSendOptions, EventState, EventStateReceived, EventStateTimeout, EventStatus, EventWaitOptions, EventWaitState };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type Serializable = void | null | string | number | boolean | {
|
|
2
|
+
[key: string]: Serializable;
|
|
3
|
+
} | Serializable[];
|
|
4
|
+
interface SerializableError {
|
|
5
|
+
message: string;
|
|
6
|
+
name: string;
|
|
7
|
+
stack?: string;
|
|
8
|
+
cause?: SerializableError;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type { Serializable, SerializableError };
|
package/dist/sleep.d.ts
CHANGED
|
@@ -1,37 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
type SleepId = string & {
|
|
5
|
-
_brand: "sleep_id";
|
|
6
|
-
};
|
|
7
|
-
type SleepPath = string & {
|
|
8
|
-
_brand: "sleep_path";
|
|
1
|
+
type SleepName = string & {
|
|
2
|
+
_brand: "sleep_name";
|
|
9
3
|
};
|
|
10
|
-
type SleepStatus = "
|
|
4
|
+
type SleepStatus = "sleeping" | "completed" | "cancelled";
|
|
11
5
|
interface SleepStateBase {
|
|
12
6
|
status: SleepStatus;
|
|
13
7
|
}
|
|
14
|
-
interface SleepStateNone extends SleepStateBase {
|
|
15
|
-
status: "none";
|
|
16
|
-
}
|
|
17
8
|
interface SleepStateSleeping extends SleepStateBase {
|
|
18
9
|
status: "sleeping";
|
|
19
10
|
awakeAt: number;
|
|
20
11
|
}
|
|
21
12
|
interface SleepStateCompleted extends SleepStateBase {
|
|
22
13
|
status: "completed";
|
|
14
|
+
durationMs: number;
|
|
23
15
|
completedAt: number;
|
|
24
16
|
}
|
|
25
17
|
interface SleepStateCancelled extends SleepStateBase {
|
|
26
18
|
status: "cancelled";
|
|
27
19
|
cancelledAt: number;
|
|
28
20
|
}
|
|
29
|
-
type SleepState =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
21
|
+
type SleepState = SleepStateSleeping | SleepStateCompleted | SleepStateCancelled;
|
|
22
|
+
interface SleepQueue {
|
|
23
|
+
sleeps: SleepState[];
|
|
24
|
+
}
|
|
33
25
|
interface SleepResult {
|
|
34
26
|
cancelled: boolean;
|
|
35
27
|
}
|
|
36
28
|
|
|
37
|
-
export type {
|
|
29
|
+
export type { SleepName, SleepQueue, SleepResult, SleepState, SleepStateCancelled, SleepStateCompleted, SleepStateSleeping, SleepStatus };
|
package/dist/task.d.ts
CHANGED
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RetryStrategy } from './retry.js';
|
|
2
|
+
import { SerializableError } from './serializable.js';
|
|
2
3
|
|
|
3
4
|
type TaskId = string & {
|
|
4
5
|
_brand: "task_id";
|
|
5
6
|
};
|
|
7
|
+
type TaskName = string & {
|
|
8
|
+
_brand: "task_name";
|
|
9
|
+
};
|
|
6
10
|
type TaskPath = string & {
|
|
7
11
|
_brand: "task_path";
|
|
8
12
|
};
|
|
9
|
-
type TaskStatus = "
|
|
13
|
+
type TaskStatus = "running" | "awaiting_retry" | "completed" | "failed";
|
|
14
|
+
interface TaskOptions {
|
|
15
|
+
retry?: RetryStrategy;
|
|
16
|
+
reference?: TaskReferenceOptions;
|
|
17
|
+
}
|
|
18
|
+
interface TaskReferenceOptions {
|
|
19
|
+
id: string;
|
|
20
|
+
onConflict?: "error" | "return_existing";
|
|
21
|
+
}
|
|
10
22
|
interface TaskStateBase {
|
|
11
23
|
status: TaskStatus;
|
|
12
24
|
}
|
|
13
|
-
interface
|
|
14
|
-
status: "none";
|
|
15
|
-
}
|
|
16
|
-
interface TaskStateRunning extends TaskStateBase {
|
|
25
|
+
interface TaskStateRunning<Input> extends TaskStateBase {
|
|
17
26
|
status: "running";
|
|
18
27
|
attempts: number;
|
|
28
|
+
input: Input;
|
|
19
29
|
}
|
|
20
30
|
interface TaskStateAwaitingRetry extends TaskStateBase {
|
|
21
31
|
status: "awaiting_retry";
|
|
@@ -25,6 +35,7 @@ interface TaskStateAwaitingRetry extends TaskStateBase {
|
|
|
25
35
|
}
|
|
26
36
|
interface TaskStateCompleted<Output> extends TaskStateBase {
|
|
27
37
|
status: "completed";
|
|
38
|
+
attempts: number;
|
|
28
39
|
output: Output;
|
|
29
40
|
}
|
|
30
41
|
interface TaskStateFailed extends TaskStateBase {
|
|
@@ -32,12 +43,49 @@ interface TaskStateFailed extends TaskStateBase {
|
|
|
32
43
|
attempts: number;
|
|
33
44
|
error: SerializableError;
|
|
34
45
|
}
|
|
35
|
-
type TaskState<Output = unknown> =
|
|
46
|
+
type TaskState<Input = unknown, Output = unknown> = TaskStateRunning<Input> | TaskStateAwaitingRetry | TaskStateCompleted<Output> | TaskStateFailed;
|
|
47
|
+
interface TaskInfo {
|
|
48
|
+
id: string;
|
|
49
|
+
name: string;
|
|
50
|
+
state: TaskState;
|
|
51
|
+
inputHash: string;
|
|
52
|
+
}
|
|
53
|
+
interface TransitionTaskStateBase {
|
|
54
|
+
id: string;
|
|
55
|
+
expectedRevision: number;
|
|
56
|
+
}
|
|
57
|
+
interface TransitionTaskStateToRunningCreate extends TransitionTaskStateBase {
|
|
58
|
+
type: "create";
|
|
59
|
+
taskName: string;
|
|
60
|
+
options?: TaskOptions;
|
|
61
|
+
taskState: TaskStateRunning<unknown>;
|
|
62
|
+
}
|
|
63
|
+
interface TransitionTaskStateToRunningRetry extends TransitionTaskStateBase {
|
|
64
|
+
type: "retry";
|
|
65
|
+
taskId: string;
|
|
66
|
+
options?: TaskOptions;
|
|
67
|
+
taskState: TaskStateRunning<unknown>;
|
|
68
|
+
}
|
|
69
|
+
interface TransitionTaskStateToCompleted extends TransitionTaskStateBase {
|
|
70
|
+
taskId: string;
|
|
71
|
+
taskState: TaskStateCompleted<unknown>;
|
|
72
|
+
}
|
|
73
|
+
interface TransitionTaskStateToFailed extends TransitionTaskStateBase {
|
|
74
|
+
taskId: string;
|
|
75
|
+
taskState: TaskStateFailed;
|
|
76
|
+
}
|
|
77
|
+
interface TransitionTaskStateToAwaitingRetry extends TransitionTaskStateBase {
|
|
78
|
+
taskId: string;
|
|
79
|
+
taskState: TaskStateAwaitingRetryRequest;
|
|
80
|
+
}
|
|
81
|
+
type TaskStateAwaitingRetryRequest = Omit<TaskStateAwaitingRetry, "nextAttemptAt"> & {
|
|
82
|
+
nextAttemptInMs: number;
|
|
83
|
+
};
|
|
36
84
|
declare class TaskFailedError extends Error {
|
|
37
|
-
readonly
|
|
85
|
+
readonly taskId: TaskId;
|
|
38
86
|
readonly attempts: number;
|
|
39
87
|
readonly reason: string;
|
|
40
|
-
constructor(
|
|
88
|
+
constructor(taskId: TaskId, attempts: number, reason: string);
|
|
41
89
|
}
|
|
42
90
|
|
|
43
|
-
export { TaskFailedError, type TaskId, type TaskPath, type TaskState, type TaskStateAwaitingRetry, type
|
|
91
|
+
export { TaskFailedError, type TaskId, type TaskInfo, type TaskName, type TaskOptions, type TaskPath, type TaskReferenceOptions, type TaskState, type TaskStateAwaitingRetry, type TaskStateAwaitingRetryRequest, type TaskStateCompleted, type TaskStateFailed, type TaskStateRunning, type TaskStatus, type TransitionTaskStateBase, type TransitionTaskStateToAwaitingRetry, type TransitionTaskStateToCompleted, type TransitionTaskStateToFailed, type TransitionTaskStateToRunningCreate, type TransitionTaskStateToRunningRetry };
|
package/dist/task.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// task.ts
|
|
2
2
|
var TaskFailedError = class extends Error {
|
|
3
|
-
constructor(
|
|
4
|
-
super(`Task ${
|
|
5
|
-
this.
|
|
3
|
+
constructor(taskId, attempts, reason) {
|
|
4
|
+
super(`Task ${taskId} failed after ${attempts} attempts. Reason: ${reason}`);
|
|
5
|
+
this.taskId = taskId;
|
|
6
6
|
this.attempts = attempts;
|
|
7
7
|
this.reason = reason;
|
|
8
8
|
this.name = "TaskFailedError";
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
type
|
|
1
|
+
type RequireAtLeastOneProp<T, Keys extends keyof T = keyof T> = {
|
|
2
2
|
[K in Keys]-?: Required<Pick<T, K>> & Omit<T, K>;
|
|
3
3
|
}[Keys];
|
|
4
4
|
type DistributiveOmit<T, K extends keyof T> = T extends T ? Omit<T, K> : never;
|
|
5
5
|
|
|
6
|
-
export type { DistributiveOmit,
|
|
6
|
+
export type { DistributiveOmit, RequireAtLeastOneProp };
|
|
File without changes
|
package/dist/worker.d.ts
ADDED
package/dist/worker.js
ADDED
|
File without changes
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import { EventSendOptions } from './event.js';
|
|
2
|
-
import {
|
|
2
|
+
import { TransitionTaskStateToRunningCreate, TransitionTaskStateToRunningRetry, TransitionTaskStateToCompleted, TransitionTaskStateToFailed, TransitionTaskStateToAwaitingRetry, TaskStateCompleted, TaskStateFailed } from './task.js';
|
|
3
3
|
import { DistributiveOmit } from './utils.js';
|
|
4
|
-
import { WorkflowRunStatus, WorkflowRun, WorkflowRunState, WorkflowOptions, WorkflowRunStateScheduled, WorkflowRunStateAwaitingEvent, WorkflowRunStateAwaitingRetry, WorkflowRunStatePaused, WorkflowRunStateCancelled, WorkflowRunTransition } from './workflow-run.js';
|
|
4
|
+
import { WorkflowRunStatus, WorkflowRun, WorkflowRunState, WorkflowOptions, WorkflowRunStateScheduled, WorkflowRunStateAwaitingEvent, WorkflowRunStateAwaitingRetry, WorkflowRunStateAwaitingChildWorkflow, WorkflowRunStatePaused, WorkflowRunStateCancelled, WorkflowRunTransition } from './workflow-run.js';
|
|
5
5
|
import './duration.js';
|
|
6
|
-
import './error.js';
|
|
7
6
|
import './retry.js';
|
|
7
|
+
import './serializable.js';
|
|
8
8
|
import './sleep.js';
|
|
9
9
|
import './trigger.js';
|
|
10
10
|
|
|
11
11
|
interface WorkflowRunApi {
|
|
12
|
-
listV1: (
|
|
13
|
-
getByIdV1: (
|
|
14
|
-
getStateV1: (
|
|
15
|
-
createV1: (
|
|
16
|
-
transitionStateV1: (
|
|
17
|
-
transitionTaskStateV1: (
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
listV1: (_: WorkflowRunListRequestV1) => Promise<WorkflowRunListResponseV1>;
|
|
13
|
+
getByIdV1: (_: WorkflowRunGetByIdRequestV1) => Promise<WorkflowRunGetByIdResponseV1>;
|
|
14
|
+
getStateV1: (_: WorkflowRunGetStateRequestV1) => Promise<WorkflowRunGetStateResponseV1>;
|
|
15
|
+
createV1: (_: WorkflowRunCreateRequestV1) => Promise<WorkflowRunCreateResponseV1>;
|
|
16
|
+
transitionStateV1: (_: WorkflowRunTransitionStateRequestV1) => Promise<WorkflowRunTransitionStateResponseV1>;
|
|
17
|
+
transitionTaskStateV1: (_: WorkflowRunTransitionTaskStateRequestV1) => Promise<WorkflowRunTransitionTaskStateResponseV1>;
|
|
18
|
+
setTaskStateV1: (_: WorkflowRunSetTaskStateRequestV1) => Promise<WorkflowRunSetTaskStateResponseV1>;
|
|
19
|
+
listTransitionsV1: (_: WorkflowRunListTransitionsRequestV1) => Promise<WorkflowRunListTransitionsResponseV1>;
|
|
20
|
+
sendEventV1: (_: WorkflowRunSendEventRequestV1) => Promise<WorkflowRunSendEventResponseV1>;
|
|
21
|
+
multicastEventV1: (_: WorkflowRunMulticastEventRequestV1) => Promise<void>;
|
|
20
22
|
}
|
|
21
23
|
interface WorkflowRunListRequestV1 {
|
|
22
24
|
limit?: number;
|
|
@@ -35,8 +37,8 @@ interface WorkflowRunListRequestV1 {
|
|
|
35
37
|
}
|
|
36
38
|
interface WorkflowRunListItem {
|
|
37
39
|
id: string;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
name: string;
|
|
41
|
+
versionId: string;
|
|
40
42
|
createdAt: number;
|
|
41
43
|
status: WorkflowRunStatus;
|
|
42
44
|
}
|
|
@@ -57,9 +59,10 @@ interface WorkflowRunGetStateResponseV1 {
|
|
|
57
59
|
state: WorkflowRunState;
|
|
58
60
|
}
|
|
59
61
|
interface WorkflowRunCreateRequestV1 {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
name: string;
|
|
63
|
+
versionId: string;
|
|
62
64
|
input: unknown;
|
|
65
|
+
parentWorkflowRunId?: string;
|
|
63
66
|
options?: WorkflowOptions;
|
|
64
67
|
}
|
|
65
68
|
interface WorkflowRunCreateResponseV1 {
|
|
@@ -74,16 +77,19 @@ type WorkflowRunStateAwaitingEventRequest = DistributiveOmit<WorkflowRunStateAwa
|
|
|
74
77
|
type WorkflowRunStateAwaitingRetryRequest = DistributiveOmit<WorkflowRunStateAwaitingRetry, "nextAttemptAt"> & {
|
|
75
78
|
nextAttemptInMs: number;
|
|
76
79
|
};
|
|
80
|
+
type WorkflowRunStateAwaitingChildWorkflowRequest = DistributiveOmit<WorkflowRunStateAwaitingChildWorkflow, "timeoutAt"> & {
|
|
81
|
+
timeoutInMs?: number;
|
|
82
|
+
};
|
|
77
83
|
type WorkflowRunStateRequest = Exclude<WorkflowRunState, {
|
|
78
|
-
status: "scheduled" | "awaiting_event" | "awaiting_retry";
|
|
79
|
-
}> | WorkflowRunStateScheduledRequest | WorkflowRunStateAwaitingEventRequest | WorkflowRunStateAwaitingRetryRequest;
|
|
84
|
+
status: "scheduled" | "awaiting_event" | "awaiting_retry" | "awaiting_child_workflow";
|
|
85
|
+
}> | WorkflowRunStateScheduledRequest | WorkflowRunStateAwaitingEventRequest | WorkflowRunStateAwaitingRetryRequest | WorkflowRunStateAwaitingChildWorkflowRequest;
|
|
80
86
|
interface WorkflowRunTransitionStateRequestBase {
|
|
81
87
|
type: "optimistic" | "pessimistic";
|
|
82
88
|
id: string;
|
|
83
89
|
state: WorkflowRunStateRequest;
|
|
84
90
|
}
|
|
85
|
-
type WorkflowRunStateScheduledRequestOptimistic =
|
|
86
|
-
reason: "
|
|
91
|
+
type WorkflowRunStateScheduledRequestOptimistic = Extract<WorkflowRunStateScheduledRequest, {
|
|
92
|
+
reason: "retry" | "task_retry" | "awake" | "event" | "child_workflow";
|
|
87
93
|
}>;
|
|
88
94
|
type WorkflowRunStateScheduledRequestPessimistic = Exclude<WorkflowRunStateScheduledRequest, WorkflowRunStateScheduledRequestOptimistic>;
|
|
89
95
|
interface WorkflowRunTransitionStateRequestOptimistic extends WorkflowRunTransitionStateRequestBase {
|
|
@@ -101,19 +107,30 @@ type WorkflowRunTransitionStateRequestV1 = WorkflowRunTransitionStateRequestOpti
|
|
|
101
107
|
interface WorkflowRunTransitionStateResponseV1 {
|
|
102
108
|
run: WorkflowRun;
|
|
103
109
|
}
|
|
104
|
-
type
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
interface
|
|
110
|
+
type TransitionTaskStateToRunning = TransitionTaskStateToRunningCreate | TransitionTaskStateToRunningRetry;
|
|
111
|
+
type WorkflowRunTransitionTaskStateRequestV1 = TransitionTaskStateToRunning | TransitionTaskStateToCompleted | TransitionTaskStateToFailed | TransitionTaskStateToAwaitingRetry;
|
|
112
|
+
interface WorkflowRunTransitionTaskStateResponseV1 {
|
|
113
|
+
run: WorkflowRun;
|
|
114
|
+
taskId: string;
|
|
115
|
+
}
|
|
116
|
+
interface WorkflowRunSetTaskStateRequestNew {
|
|
117
|
+
type: "new";
|
|
111
118
|
id: string;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
119
|
+
taskName: string;
|
|
120
|
+
input: unknown;
|
|
121
|
+
reference?: {
|
|
122
|
+
id: string;
|
|
123
|
+
};
|
|
124
|
+
state: DistributiveOmit<TaskStateCompleted<unknown> | TaskStateFailed, "attempts">;
|
|
115
125
|
}
|
|
116
|
-
interface
|
|
126
|
+
interface WorkflowRunSetTaskStateRequestExisting {
|
|
127
|
+
type: "existing";
|
|
128
|
+
id: string;
|
|
129
|
+
taskId: string;
|
|
130
|
+
state: DistributiveOmit<TaskStateCompleted<unknown> | TaskStateFailed, "attempts">;
|
|
131
|
+
}
|
|
132
|
+
type WorkflowRunSetTaskStateRequestV1 = WorkflowRunSetTaskStateRequestNew | WorkflowRunSetTaskStateRequestExisting;
|
|
133
|
+
interface WorkflowRunSetTaskStateResponseV1 {
|
|
117
134
|
run: WorkflowRun;
|
|
118
135
|
}
|
|
119
136
|
interface WorkflowRunListTransitionsRequestV1 {
|
|
@@ -131,12 +148,18 @@ interface WorkflowRunListTransitionsResponseV1 {
|
|
|
131
148
|
}
|
|
132
149
|
interface WorkflowRunSendEventRequestV1 {
|
|
133
150
|
id: string;
|
|
134
|
-
|
|
151
|
+
eventName: string;
|
|
135
152
|
data: unknown;
|
|
136
153
|
options?: EventSendOptions;
|
|
137
154
|
}
|
|
138
155
|
interface WorkflowRunSendEventResponseV1 {
|
|
139
156
|
run: WorkflowRun;
|
|
140
157
|
}
|
|
158
|
+
interface WorkflowRunMulticastEventRequestV1 {
|
|
159
|
+
ids: string[];
|
|
160
|
+
eventName: string;
|
|
161
|
+
data: unknown;
|
|
162
|
+
options?: EventSendOptions;
|
|
163
|
+
}
|
|
141
164
|
|
|
142
|
-
export type {
|
|
165
|
+
export type { TransitionTaskStateToRunning, WorkflowRunApi, WorkflowRunCreateRequestV1, WorkflowRunCreateResponseV1, WorkflowRunGetByIdRequestV1, WorkflowRunGetByIdResponseV1, WorkflowRunGetStateRequestV1, WorkflowRunGetStateResponseV1, WorkflowRunListItem, WorkflowRunListRequestV1, WorkflowRunListResponseV1, WorkflowRunListTransitionsRequestV1, WorkflowRunListTransitionsResponseV1, WorkflowRunMulticastEventRequestV1, WorkflowRunSendEventRequestV1, WorkflowRunSendEventResponseV1, WorkflowRunSetTaskStateRequestExisting, WorkflowRunSetTaskStateRequestNew, WorkflowRunSetTaskStateRequestV1, WorkflowRunSetTaskStateResponseV1, WorkflowRunStateAwaitingChildWorkflowRequest, WorkflowRunStateAwaitingEventRequest, WorkflowRunStateAwaitingRetryRequest, WorkflowRunStateRequest, WorkflowRunStateScheduledRequest, WorkflowRunStateScheduledRequestOptimistic, WorkflowRunStateScheduledRequestPessimistic, WorkflowRunTransitionStateRequestOptimistic, WorkflowRunTransitionStateRequestPessimistic, WorkflowRunTransitionStateRequestV1, WorkflowRunTransitionStateResponseV1, WorkflowRunTransitionTaskStateRequestV1, WorkflowRunTransitionTaskStateResponseV1 };
|
package/dist/workflow-run.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SerializableError } from './error.js';
|
|
2
1
|
import { EventQueue } from './event.js';
|
|
3
2
|
import { RetryStrategy } from './retry.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { SerializableError } from './serializable.js';
|
|
4
|
+
import { SleepQueue } from './sleep.js';
|
|
5
|
+
import { TaskInfo, TaskState } from './task.js';
|
|
6
6
|
import { TriggerStrategy } from './trigger.js';
|
|
7
7
|
import './duration.js';
|
|
8
8
|
import './utils.js';
|
|
@@ -10,19 +10,28 @@ import './utils.js';
|
|
|
10
10
|
type WorkflowRunId = string & {
|
|
11
11
|
_brand: "workflow_run_id";
|
|
12
12
|
};
|
|
13
|
+
type WorkflowRunPath = string & {
|
|
14
|
+
_brand: "workflow_run_path";
|
|
15
|
+
};
|
|
13
16
|
type WorkflowRunStatus = "scheduled" | "queued" | "running" | "paused" | "sleeping" | "awaiting_event" | "awaiting_retry" | "awaiting_child_workflow" | "cancelled" | "completed" | "failed";
|
|
14
|
-
|
|
17
|
+
declare const terminalWorkflowRunStatuses: readonly ["cancelled", "completed", "failed"];
|
|
18
|
+
type TerminalWorkflowRunStatus = (typeof terminalWorkflowRunStatuses)[number];
|
|
15
19
|
type NonTerminalWorkflowRunStatus = Exclude<WorkflowRunStatus, TerminalWorkflowRunStatus>;
|
|
20
|
+
declare function isTerminalWorkflowRunStatus(status: WorkflowRunStatus): status is TerminalWorkflowRunStatus;
|
|
21
|
+
interface WorkflowReferenceOptions {
|
|
22
|
+
id: string;
|
|
23
|
+
onConflict?: "error" | "return_existing";
|
|
24
|
+
}
|
|
16
25
|
interface WorkflowOptions {
|
|
17
26
|
retry?: RetryStrategy;
|
|
18
|
-
|
|
27
|
+
reference?: WorkflowReferenceOptions;
|
|
19
28
|
trigger?: TriggerStrategy;
|
|
20
|
-
|
|
29
|
+
shard?: string;
|
|
21
30
|
}
|
|
22
31
|
interface WorkflowRunStateBase {
|
|
23
32
|
status: WorkflowRunStatus;
|
|
24
33
|
}
|
|
25
|
-
type WorkflowRunScheduledReason = "new" | "retry" | "task_retry" | "awake" | "resume" | "event";
|
|
34
|
+
type WorkflowRunScheduledReason = "new" | "retry" | "task_retry" | "awake" | "awake_early" | "resume" | "event" | "child_workflow";
|
|
26
35
|
interface WorkflowRunStateScheduledBase extends WorkflowRunStateBase {
|
|
27
36
|
status: "scheduled";
|
|
28
37
|
scheduledAt: number;
|
|
@@ -40,13 +49,19 @@ interface WorkflowRunStateScheduledByTaskRetry extends WorkflowRunStateScheduled
|
|
|
40
49
|
interface WorkflowRunStateScheduledByAwake extends WorkflowRunStateScheduledBase {
|
|
41
50
|
reason: "awake";
|
|
42
51
|
}
|
|
52
|
+
interface WorkflowRunStateScheduledByAwakeEarly extends WorkflowRunStateScheduledBase {
|
|
53
|
+
reason: "awake_early";
|
|
54
|
+
}
|
|
43
55
|
interface WorkflowRunStateScheduledByResume extends WorkflowRunStateScheduledBase {
|
|
44
56
|
reason: "resume";
|
|
45
57
|
}
|
|
46
58
|
interface WorkflowRunStateScheduledByEvent extends WorkflowRunStateScheduledBase {
|
|
47
59
|
reason: "event";
|
|
48
60
|
}
|
|
49
|
-
|
|
61
|
+
interface WorkflowRunStateScheduledByChildWorkflow extends WorkflowRunStateScheduledBase {
|
|
62
|
+
reason: "child_workflow";
|
|
63
|
+
}
|
|
64
|
+
type WorkflowRunStateScheduled = WorkflowRunStateScheduledByNew | WorkflowRunStateScheduledByRetry | WorkflowRunStateScheduledByTaskRetry | WorkflowRunStateScheduledByAwake | WorkflowRunStateScheduledByAwakeEarly | WorkflowRunStateScheduledByResume | WorkflowRunStateScheduledByEvent | WorkflowRunStateScheduledByChildWorkflow;
|
|
50
65
|
interface WorkflowRunStateQueued extends WorkflowRunStateBase {
|
|
51
66
|
status: "queued";
|
|
52
67
|
reason: WorkflowRunScheduledReason;
|
|
@@ -59,12 +74,12 @@ interface WorkflowRunStatePaused extends WorkflowRunStateBase {
|
|
|
59
74
|
}
|
|
60
75
|
interface WorkflowRunStateSleeping extends WorkflowRunStateBase {
|
|
61
76
|
status: "sleeping";
|
|
62
|
-
|
|
77
|
+
sleepName: string;
|
|
63
78
|
durationMs: number;
|
|
64
79
|
}
|
|
65
80
|
interface WorkflowRunStateAwaitingEvent extends WorkflowRunStateBase {
|
|
66
81
|
status: "awaiting_event";
|
|
67
|
-
|
|
82
|
+
eventName: string;
|
|
68
83
|
timeoutAt?: number;
|
|
69
84
|
}
|
|
70
85
|
type WorkflowFailureCause = "task" | "child_workflow" | "self";
|
|
@@ -75,7 +90,7 @@ interface WorkflowRunStateAwaitingRetryBase extends WorkflowRunStateBase {
|
|
|
75
90
|
}
|
|
76
91
|
interface WorkflowRunStateAwaitingRetryCausedByTask extends WorkflowRunStateAwaitingRetryBase {
|
|
77
92
|
cause: "task";
|
|
78
|
-
|
|
93
|
+
taskId: string;
|
|
79
94
|
}
|
|
80
95
|
interface WorkflowRunStateAwaitingRetryCausedByChildWorkflow extends WorkflowRunStateAwaitingRetryBase {
|
|
81
96
|
cause: "child_workflow";
|
|
@@ -88,6 +103,9 @@ interface WorkflowRunStateAwaitingRetryCausedBySelf extends WorkflowRunStateAwai
|
|
|
88
103
|
type WorkflowRunStateAwaitingRetry = WorkflowRunStateAwaitingRetryCausedByTask | WorkflowRunStateAwaitingRetryCausedByChildWorkflow | WorkflowRunStateAwaitingRetryCausedBySelf;
|
|
89
104
|
interface WorkflowRunStateAwaitingChildWorkflow extends WorkflowRunStateBase {
|
|
90
105
|
status: "awaiting_child_workflow";
|
|
106
|
+
childWorkflowRunId: string;
|
|
107
|
+
childWorkflowRunStatus: WorkflowRunStatus;
|
|
108
|
+
timeoutAt?: number;
|
|
91
109
|
}
|
|
92
110
|
interface WorkflowRunStateCancelled extends WorkflowRunStateBase {
|
|
93
111
|
status: "cancelled";
|
|
@@ -103,7 +121,7 @@ interface WorkflowRunStateFailedBase extends WorkflowRunStateBase {
|
|
|
103
121
|
}
|
|
104
122
|
interface WorkflowRunStateFailedByTask extends WorkflowRunStateFailedBase {
|
|
105
123
|
cause: "task";
|
|
106
|
-
|
|
124
|
+
taskId: string;
|
|
107
125
|
}
|
|
108
126
|
interface WorkflowRunStateFailedByChildWorkflow extends WorkflowRunStateFailedBase {
|
|
109
127
|
cause: "child_workflow";
|
|
@@ -118,20 +136,38 @@ type WorkflowRunStateInComplete = WorkflowRunStateScheduled | WorkflowRunStateQu
|
|
|
118
136
|
type WorkflowRunState<Output = unknown> = WorkflowRunStateInComplete | WorkflowRunStateCompleted<Output>;
|
|
119
137
|
interface WorkflowRun<Input = unknown, Output = unknown> {
|
|
120
138
|
id: string;
|
|
121
|
-
|
|
122
|
-
|
|
139
|
+
name: string;
|
|
140
|
+
versionId: string;
|
|
123
141
|
createdAt: number;
|
|
124
142
|
revision: number;
|
|
125
143
|
input: Input;
|
|
144
|
+
path: string;
|
|
126
145
|
options: WorkflowOptions;
|
|
127
146
|
attempts: number;
|
|
128
147
|
state: WorkflowRunState<Output>;
|
|
129
|
-
|
|
130
|
-
|
|
148
|
+
tasks: Record<string, TaskInfo>;
|
|
149
|
+
sleepsQueue: Record<string, SleepQueue>;
|
|
131
150
|
eventsQueue: Record<string, EventQueue<unknown>>;
|
|
132
|
-
|
|
151
|
+
childWorkflowRuns: Record<string, ChildWorkflowRunInfo>;
|
|
152
|
+
parentWorkflowRunId?: string;
|
|
153
|
+
}
|
|
154
|
+
interface ChildWorkflowRunInfo {
|
|
155
|
+
id: string;
|
|
156
|
+
inputHash: string;
|
|
157
|
+
statusWaitResults: ChildWorkflowWaitResult[];
|
|
158
|
+
}
|
|
159
|
+
type ChildWorkflowWaitResult = ChildWorkflowWaitResultCompleted | ChildWorkflowWaitResultTimeout;
|
|
160
|
+
interface ChildWorkflowWaitResultCompleted {
|
|
161
|
+
status: "completed";
|
|
162
|
+
completedAt: number;
|
|
163
|
+
childWorkflowRunState: WorkflowRunState;
|
|
164
|
+
}
|
|
165
|
+
interface ChildWorkflowWaitResultTimeout {
|
|
166
|
+
status: "timeout";
|
|
167
|
+
timedOutAt: number;
|
|
133
168
|
}
|
|
134
169
|
interface WorkflowRunTransitionBase {
|
|
170
|
+
id: string;
|
|
135
171
|
createdAt: number;
|
|
136
172
|
type: "state" | "task_state";
|
|
137
173
|
}
|
|
@@ -141,7 +177,7 @@ interface WorkflowRunStateTransition extends WorkflowRunTransitionBase {
|
|
|
141
177
|
}
|
|
142
178
|
interface WorkflowRunTaskStateTransition extends WorkflowRunTransitionBase {
|
|
143
179
|
type: "task_state";
|
|
144
|
-
|
|
180
|
+
taskId: string;
|
|
145
181
|
taskState: TaskState;
|
|
146
182
|
}
|
|
147
183
|
type WorkflowRunTransition = WorkflowRunStateTransition | WorkflowRunTaskStateTransition;
|
|
@@ -157,7 +193,12 @@ declare class WorkflowRunSuspendedError extends Error {
|
|
|
157
193
|
declare class WorkflowRunFailedError extends Error {
|
|
158
194
|
readonly id: WorkflowRunId;
|
|
159
195
|
readonly attempts: number;
|
|
160
|
-
|
|
196
|
+
readonly reason?: string | undefined;
|
|
197
|
+
constructor(id: WorkflowRunId, attempts: number, reason?: string | undefined);
|
|
198
|
+
}
|
|
199
|
+
declare class WorkflowRunConflictError extends Error {
|
|
200
|
+
readonly id: WorkflowRunId;
|
|
201
|
+
constructor(id: WorkflowRunId);
|
|
161
202
|
}
|
|
162
203
|
|
|
163
|
-
export { type NonTerminalWorkflowRunStatus, type TerminalWorkflowRunStatus, type WorkflowFailureCause, type WorkflowOptions, type WorkflowRun, WorkflowRunFailedError, type WorkflowRunId, WorkflowRunNotExecutableError, type WorkflowRunScheduledReason, type WorkflowRunState, type WorkflowRunStateAwaitingChildWorkflow, type WorkflowRunStateAwaitingEvent, type WorkflowRunStateAwaitingRetry, type WorkflowRunStateAwaitingRetryBase, type WorkflowRunStateAwaitingRetryCausedByChildWorkflow, type WorkflowRunStateAwaitingRetryCausedBySelf, type WorkflowRunStateAwaitingRetryCausedByTask, type WorkflowRunStateCancelled, type WorkflowRunStateCompleted, type WorkflowRunStateFailed, type WorkflowRunStateFailedByChildWorkflow, type WorkflowRunStateFailedBySelf, type WorkflowRunStateFailedByTask, type WorkflowRunStateInComplete, type WorkflowRunStatePaused, type WorkflowRunStateQueued, type WorkflowRunStateRunning, type WorkflowRunStateScheduled, type WorkflowRunStateScheduledByAwake, type WorkflowRunStateScheduledByEvent, type WorkflowRunStateScheduledByNew, type WorkflowRunStateScheduledByResume, type WorkflowRunStateScheduledByRetry, type WorkflowRunStateScheduledByTaskRetry, type WorkflowRunStateSleeping, type WorkflowRunStateTransition, type WorkflowRunStatus, WorkflowRunSuspendedError, type WorkflowRunTaskStateTransition, type WorkflowRunTransition, type WorkflowRunTransitionBase };
|
|
204
|
+
export { type ChildWorkflowRunInfo, type ChildWorkflowWaitResult, type ChildWorkflowWaitResultCompleted, type ChildWorkflowWaitResultTimeout, type NonTerminalWorkflowRunStatus, type TerminalWorkflowRunStatus, type WorkflowFailureCause, type WorkflowOptions, type WorkflowReferenceOptions, type WorkflowRun, WorkflowRunConflictError, WorkflowRunFailedError, type WorkflowRunId, WorkflowRunNotExecutableError, type WorkflowRunPath, type WorkflowRunScheduledReason, type WorkflowRunState, type WorkflowRunStateAwaitingChildWorkflow, type WorkflowRunStateAwaitingEvent, type WorkflowRunStateAwaitingRetry, type WorkflowRunStateAwaitingRetryBase, type WorkflowRunStateAwaitingRetryCausedByChildWorkflow, type WorkflowRunStateAwaitingRetryCausedBySelf, type WorkflowRunStateAwaitingRetryCausedByTask, type WorkflowRunStateCancelled, type WorkflowRunStateCompleted, type WorkflowRunStateFailed, type WorkflowRunStateFailedByChildWorkflow, type WorkflowRunStateFailedBySelf, type WorkflowRunStateFailedByTask, type WorkflowRunStateInComplete, type WorkflowRunStatePaused, type WorkflowRunStateQueued, type WorkflowRunStateRunning, type WorkflowRunStateScheduled, type WorkflowRunStateScheduledByAwake, type WorkflowRunStateScheduledByAwakeEarly, type WorkflowRunStateScheduledByChildWorkflow, type WorkflowRunStateScheduledByEvent, type WorkflowRunStateScheduledByNew, type WorkflowRunStateScheduledByResume, type WorkflowRunStateScheduledByRetry, type WorkflowRunStateScheduledByTaskRetry, type WorkflowRunStateSleeping, type WorkflowRunStateTransition, type WorkflowRunStatus, WorkflowRunSuspendedError, type WorkflowRunTaskStateTransition, type WorkflowRunTransition, type WorkflowRunTransitionBase, isTerminalWorkflowRunStatus };
|
package/dist/workflow-run.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
// workflow-run.ts
|
|
2
|
+
var terminalWorkflowRunStatuses = ["cancelled", "completed", "failed"];
|
|
3
|
+
function isTerminalWorkflowRunStatus(status) {
|
|
4
|
+
for (const terminalStatus of terminalWorkflowRunStatuses) {
|
|
5
|
+
if (status === terminalStatus) {
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
2
11
|
var WorkflowRunNotExecutableError = class extends Error {
|
|
3
12
|
constructor(id, status) {
|
|
4
13
|
super(`Workflow ${id} is not executable while ${status}`);
|
|
@@ -15,15 +24,33 @@ var WorkflowRunSuspendedError = class extends Error {
|
|
|
15
24
|
}
|
|
16
25
|
};
|
|
17
26
|
var WorkflowRunFailedError = class extends Error {
|
|
18
|
-
constructor(id, attempts) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
constructor(id, attempts, reason) {
|
|
28
|
+
var __super = (...args) => {
|
|
29
|
+
super(...args);
|
|
30
|
+
this.id = id;
|
|
31
|
+
this.attempts = attempts;
|
|
32
|
+
this.reason = reason;
|
|
33
|
+
return this;
|
|
34
|
+
};
|
|
35
|
+
if (reason) {
|
|
36
|
+
__super(`Workflow ${id} failed after ${attempts} attempt(s): ${reason}`);
|
|
37
|
+
} else {
|
|
38
|
+
__super(`Workflow ${id} failed after ${attempts} attempt(s)`);
|
|
39
|
+
}
|
|
22
40
|
this.name = "WorkflowRunFailedError";
|
|
23
41
|
}
|
|
24
42
|
};
|
|
43
|
+
var WorkflowRunConflictError = class extends Error {
|
|
44
|
+
constructor(id) {
|
|
45
|
+
super(`Conflict while trying to update Workflow run ${id}`);
|
|
46
|
+
this.id = id;
|
|
47
|
+
this.name = "WorkflowRunConflictError";
|
|
48
|
+
}
|
|
49
|
+
};
|
|
25
50
|
export {
|
|
51
|
+
WorkflowRunConflictError,
|
|
26
52
|
WorkflowRunFailedError,
|
|
27
53
|
WorkflowRunNotExecutableError,
|
|
28
|
-
WorkflowRunSuspendedError
|
|
54
|
+
WorkflowRunSuspendedError,
|
|
55
|
+
isTerminalWorkflowRunStatus
|
|
29
56
|
};
|
package/dist/workflow.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
type
|
|
2
|
-
_brand: "
|
|
1
|
+
type WorkflowName = string & {
|
|
2
|
+
_brand: "workflow_name";
|
|
3
3
|
};
|
|
4
4
|
type WorkflowVersionId = string & {
|
|
5
5
|
_brand: "workflow_version_id";
|
|
6
6
|
};
|
|
7
7
|
interface WorkflowMeta {
|
|
8
|
-
|
|
8
|
+
name: WorkflowName;
|
|
9
9
|
versionId: WorkflowVersionId;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export type {
|
|
12
|
+
export type { WorkflowMeta, WorkflowName, WorkflowVersionId };
|
package/package.json
CHANGED
|
@@ -1,37 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aikirun/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Core type definitions for Aiki - including workflow, task, client, and trigger types",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
|
-
"./
|
|
8
|
-
"types": "./dist/
|
|
9
|
-
"import": "./dist/
|
|
10
|
-
},
|
|
11
|
-
"./symbols": {
|
|
12
|
-
"types": "./dist/symbols.d.ts",
|
|
13
|
-
"import": "./dist/symbols.js"
|
|
7
|
+
"./client": {
|
|
8
|
+
"types": "./dist/client.d.ts",
|
|
9
|
+
"import": "./dist/client.js"
|
|
14
10
|
},
|
|
15
11
|
"./duration": {
|
|
16
12
|
"types": "./dist/duration.d.ts",
|
|
17
13
|
"import": "./dist/duration.js"
|
|
18
14
|
},
|
|
15
|
+
"./event": {
|
|
16
|
+
"types": "./dist/event.d.ts",
|
|
17
|
+
"import": "./dist/event.js"
|
|
18
|
+
},
|
|
19
19
|
"./retry": {
|
|
20
20
|
"types": "./dist/retry.d.ts",
|
|
21
21
|
"import": "./dist/retry.js"
|
|
22
22
|
},
|
|
23
|
-
"./
|
|
24
|
-
"types": "./dist/
|
|
25
|
-
"import": "./dist/
|
|
23
|
+
"./serializable": {
|
|
24
|
+
"types": "./dist/serializable.d.ts",
|
|
25
|
+
"import": "./dist/serializable.js"
|
|
26
26
|
},
|
|
27
|
-
"./
|
|
28
|
-
"types": "./dist/
|
|
29
|
-
"import": "./dist/
|
|
27
|
+
"./sleep": {
|
|
28
|
+
"types": "./dist/sleep.d.ts",
|
|
29
|
+
"import": "./dist/sleep.js"
|
|
30
|
+
},
|
|
31
|
+
"./symbols": {
|
|
32
|
+
"types": "./dist/symbols.d.ts",
|
|
33
|
+
"import": "./dist/symbols.js"
|
|
34
|
+
},
|
|
35
|
+
"./task": {
|
|
36
|
+
"types": "./dist/task.d.ts",
|
|
37
|
+
"import": "./dist/task.js"
|
|
30
38
|
},
|
|
31
39
|
"./trigger": {
|
|
32
40
|
"types": "./dist/trigger.d.ts",
|
|
33
41
|
"import": "./dist/trigger.js"
|
|
34
42
|
},
|
|
43
|
+
"./utils": {
|
|
44
|
+
"types": "./dist/utils.d.ts",
|
|
45
|
+
"import": "./dist/utils.js"
|
|
46
|
+
},
|
|
47
|
+
"./validator": {
|
|
48
|
+
"types": "./dist/validator.d.ts",
|
|
49
|
+
"import": "./dist/validator.js"
|
|
50
|
+
},
|
|
51
|
+
"./worker": {
|
|
52
|
+
"types": "./dist/worker.d.ts",
|
|
53
|
+
"import": "./dist/worker.js"
|
|
54
|
+
},
|
|
35
55
|
"./workflow": {
|
|
36
56
|
"types": "./dist/workflow.d.ts",
|
|
37
57
|
"import": "./dist/workflow.js"
|
|
@@ -43,18 +63,6 @@
|
|
|
43
63
|
"./workflow-run-api": {
|
|
44
64
|
"types": "./dist/workflow-run-api.d.ts",
|
|
45
65
|
"import": "./dist/workflow-run-api.js"
|
|
46
|
-
},
|
|
47
|
-
"./task": {
|
|
48
|
-
"types": "./dist/task.d.ts",
|
|
49
|
-
"import": "./dist/task.js"
|
|
50
|
-
},
|
|
51
|
-
"./sleep": {
|
|
52
|
-
"types": "./dist/sleep.d.ts",
|
|
53
|
-
"import": "./dist/sleep.js"
|
|
54
|
-
},
|
|
55
|
-
"./event": {
|
|
56
|
-
"types": "./dist/event.d.ts",
|
|
57
|
-
"import": "./dist/event.js"
|
|
58
66
|
}
|
|
59
67
|
},
|
|
60
68
|
"files": [
|
package/dist/error.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
type SerializableInput = null | string | number | boolean | {
|
|
2
|
-
[key: string]: SerializableInput;
|
|
3
|
-
} | SerializableInput[];
|
|
4
|
-
interface SerializableError {
|
|
5
|
-
message: string;
|
|
6
|
-
name: string;
|
|
7
|
-
stack?: string;
|
|
8
|
-
cause?: SerializableError;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export type { SerializableError, SerializableInput };
|
|
File without changes
|