@hatchet-dev/typescript-sdk 1.2.0-alpha.1 → 1.3.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/clients/admin/admin-client.d.ts +3 -1
- package/clients/admin/admin-client.js +1 -1
- package/clients/hatchet-client/features/cron-client.d.ts +3 -0
- package/clients/hatchet-client/features/cron-client.js +2 -0
- package/clients/hatchet-client/features/schedule-client.d.ts +3 -0
- package/clients/hatchet-client/features/schedule-client.js +2 -0
- package/clients/rest/generated/data-contracts.d.ts +193 -167
- package/clients/rest/generated/data-contracts.js +168 -168
- package/clients/worker/worker.js +5 -1
- package/package.json +2 -3
- package/protoc/dispatcher/dispatcher.d.ts +1 -0
- package/protoc/dispatcher/dispatcher.js +17 -1
- package/protoc/v1/workflows.d.ts +6 -1
- package/protoc/v1/workflows.js +60 -4
- package/protoc/workflows/workflows.d.ts +2 -0
- package/protoc/workflows/workflows.js +17 -1
- package/step.d.ts +15 -34
- package/step.js +25 -42
- package/v1/client/client.d.ts +3 -11
- package/v1/client/client.interface.d.ts +0 -2
- package/v1/client/client.js +14 -35
- package/v1/client/worker.js +2 -4
- package/v1/declaration.d.ts +32 -6
- package/v1/declaration.js +55 -64
- package/v1/examples/cancellations/run.js +4 -4
- package/v1/examples/multiple_wf_concurrency/run.js +39 -0
- package/v1/examples/{middleware → multiple_wf_concurrency}/worker.js +3 -8
- package/v1/examples/multiple_wf_concurrency/workflow.d.ts +11 -0
- package/v1/examples/multiple_wf_concurrency/workflow.js +43 -0
- package/v1/examples/priority/run.d.ts +1 -0
- package/v1/examples/priority/run.js +41 -0
- package/v1/examples/priority/worker.d.ts +1 -0
- package/v1/examples/{middleware/run.js → priority/worker.js} +5 -15
- package/v1/examples/priority/workflow.d.ts +8 -0
- package/v1/examples/priority/workflow.js +50 -0
- package/v1/index.d.ts +1 -0
- package/v1/index.js +1 -0
- package/v1/task.d.ts +6 -7
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/v1/examples/middleware/hatchet-client.d.ts +0 -2
- package/v1/examples/middleware/hatchet-client.js +0 -32
- package/v1/examples/middleware/workflow.d.ts +0 -9
- package/v1/examples/middleware/workflow.js +0 -37
- package/v1/next/index.d.ts +0 -1
- package/v1/next/index.js +0 -17
- package/v1/next/middleware/middleware.d.ts +0 -27
- package/v1/next/middleware/middleware.js +0 -121
- /package/v1/examples/{middleware → multiple_wf_concurrency}/run.d.ts +0 -0
- /package/v1/examples/{middleware → multiple_wf_concurrency}/worker.d.ts +0 -0
|
@@ -4,7 +4,7 @@ import { ClientConfig } from '../hatchet-client/client-config';
|
|
|
4
4
|
import { Logger } from '../../util/logger';
|
|
5
5
|
import WorkflowRunRef from '../../util/workflow-run-ref';
|
|
6
6
|
import { AdminServiceClient, CreateWorkflowVersionRequest } from '../../protoc/v1/workflows';
|
|
7
|
-
import { RunsClient } from '../../v1';
|
|
7
|
+
import { Priority, RunsClient } from '../../v1';
|
|
8
8
|
import { Api } from '../rest';
|
|
9
9
|
import { WebhookWorkerCreateRequest, WorkflowRunStatus, WorkflowRunStatusList } from '../rest/generated/data-contracts';
|
|
10
10
|
import { RunListenerClient } from '../listeners/run-listener/child-listener-client';
|
|
@@ -85,6 +85,7 @@ export declare class AdminClient {
|
|
|
85
85
|
childKey?: string | undefined;
|
|
86
86
|
additionalMetadata?: Record<string, string> | undefined;
|
|
87
87
|
desiredWorkerId?: string | undefined;
|
|
88
|
+
priority?: Priority;
|
|
88
89
|
}): WorkflowRunRef<P>;
|
|
89
90
|
/**
|
|
90
91
|
* Run multiple workflows runs with the given input and options. This will create new workflow runs and return their IDs.
|
|
@@ -102,6 +103,7 @@ export declare class AdminClient {
|
|
|
102
103
|
childKey?: string | undefined;
|
|
103
104
|
additionalMetadata?: Record<string, string> | undefined;
|
|
104
105
|
desiredWorkerId?: string | undefined;
|
|
106
|
+
priority?: Priority;
|
|
105
107
|
};
|
|
106
108
|
}>): Promise<WorkflowRunRef<P>[]>;
|
|
107
109
|
/**
|
|
@@ -124,7 +124,7 @@ class AdminClient {
|
|
|
124
124
|
const inputStr = JSON.stringify(input);
|
|
125
125
|
const resp = this.client.triggerWorkflow(Object.assign(Object.assign({ name: computedName, input: inputStr }, options), { additionalMetadata: (options === null || options === void 0 ? void 0 : options.additionalMetadata)
|
|
126
126
|
? JSON.stringify(options === null || options === void 0 ? void 0 : options.additionalMetadata)
|
|
127
|
-
: undefined }));
|
|
127
|
+
: undefined, priority: options === null || options === void 0 ? void 0 : options.priority }));
|
|
128
128
|
return new workflow_run_ref_1.default(resp, this.listenerClient, this.workflows, options === null || options === void 0 ? void 0 : options.parentId);
|
|
129
129
|
}
|
|
130
130
|
catch (e) {
|
|
@@ -12,15 +12,18 @@ export declare const CreateCronTriggerSchema: z.ZodObject<{
|
|
|
12
12
|
expression: z.ZodEffects<z.ZodString, string, string>;
|
|
13
13
|
input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
14
14
|
additionalMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
15
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
15
16
|
}, "strip", z.ZodTypeAny, {
|
|
16
17
|
name: string;
|
|
17
18
|
expression: string;
|
|
18
19
|
additionalMetadata?: Record<string, string> | undefined;
|
|
20
|
+
priority?: number | undefined;
|
|
19
21
|
input?: Record<string, any> | undefined;
|
|
20
22
|
}, {
|
|
21
23
|
name: string;
|
|
22
24
|
expression: string;
|
|
23
25
|
additionalMetadata?: Record<string, string> | undefined;
|
|
26
|
+
priority?: number | undefined;
|
|
24
27
|
input?: Record<string, any> | undefined;
|
|
25
28
|
}>;
|
|
26
29
|
/**
|
|
@@ -24,6 +24,7 @@ exports.CreateCronTriggerSchema = zod_1.z.object({
|
|
|
24
24
|
}, 'Invalid cron expression'),
|
|
25
25
|
input: zod_1.z.record(zod_1.z.any()).optional(),
|
|
26
26
|
additionalMetadata: zod_1.z.record(zod_1.z.string()).optional(),
|
|
27
|
+
priority: zod_1.z.number().optional(),
|
|
27
28
|
});
|
|
28
29
|
/**
|
|
29
30
|
* Client for managing Cron Triggers.
|
|
@@ -70,6 +71,7 @@ class CronClient {
|
|
|
70
71
|
cronExpression: parsedCron.expression,
|
|
71
72
|
input: (_a = parsedCron.input) !== null && _a !== void 0 ? _a : {},
|
|
72
73
|
additionalMetadata: (_b = parsedCron.additionalMetadata) !== null && _b !== void 0 ? _b : {},
|
|
74
|
+
priority: parsedCron.priority,
|
|
73
75
|
});
|
|
74
76
|
return response.data;
|
|
75
77
|
}
|
|
@@ -11,13 +11,16 @@ export declare const CreateScheduledRunTriggerSchema: z.ZodObject<{
|
|
|
11
11
|
triggerAt: z.ZodDate;
|
|
12
12
|
input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
13
13
|
additionalMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
14
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
14
15
|
}, "strip", z.ZodTypeAny, {
|
|
15
16
|
triggerAt: Date;
|
|
16
17
|
additionalMetadata?: Record<string, string> | undefined;
|
|
18
|
+
priority?: number | undefined;
|
|
17
19
|
input?: Record<string, any> | undefined;
|
|
18
20
|
}, {
|
|
19
21
|
triggerAt: Date;
|
|
20
22
|
additionalMetadata?: Record<string, string> | undefined;
|
|
23
|
+
priority?: number | undefined;
|
|
21
24
|
input?: Record<string, any> | undefined;
|
|
22
25
|
}>;
|
|
23
26
|
/**
|
|
@@ -19,6 +19,7 @@ exports.CreateScheduledRunTriggerSchema = zod_1.z.object({
|
|
|
19
19
|
triggerAt: zod_1.z.coerce.date(),
|
|
20
20
|
input: zod_1.z.record(zod_1.z.any()).optional(),
|
|
21
21
|
additionalMetadata: zod_1.z.record(zod_1.z.string()).optional(),
|
|
22
|
+
priority: zod_1.z.number().optional(),
|
|
22
23
|
});
|
|
23
24
|
/**
|
|
24
25
|
* Client for managing Scheduled Runs.
|
|
@@ -64,6 +65,7 @@ class ScheduleClient {
|
|
|
64
65
|
input: (_a = parsedCron.input) !== null && _a !== void 0 ? _a : {},
|
|
65
66
|
additionalMetadata: (_b = parsedCron.additionalMetadata) !== null && _b !== void 0 ? _b : {},
|
|
66
67
|
triggerAt: parsedCron.triggerAt.toISOString(),
|
|
68
|
+
priority: parsedCron.priority,
|
|
67
69
|
});
|
|
68
70
|
return response.data;
|
|
69
71
|
}
|
|
@@ -1,3 +1,164 @@
|
|
|
1
|
+
export declare enum V1LogLineLevel {
|
|
2
|
+
DEBUG = "DEBUG",
|
|
3
|
+
INFO = "INFO",
|
|
4
|
+
WARN = "WARN",
|
|
5
|
+
ERROR = "ERROR"
|
|
6
|
+
}
|
|
7
|
+
export declare enum V1TaskRunStatus {
|
|
8
|
+
PENDING = "PENDING",
|
|
9
|
+
RUNNING = "RUNNING",
|
|
10
|
+
COMPLETED = "COMPLETED",
|
|
11
|
+
FAILED = "FAILED",
|
|
12
|
+
CANCELLED = "CANCELLED"
|
|
13
|
+
}
|
|
14
|
+
export declare enum V1TaskStatus {
|
|
15
|
+
QUEUED = "QUEUED",
|
|
16
|
+
RUNNING = "RUNNING",
|
|
17
|
+
COMPLETED = "COMPLETED",
|
|
18
|
+
CANCELLED = "CANCELLED",
|
|
19
|
+
FAILED = "FAILED"
|
|
20
|
+
}
|
|
21
|
+
export declare enum WebhookWorkerRequestMethod {
|
|
22
|
+
GET = "GET",
|
|
23
|
+
POST = "POST",
|
|
24
|
+
PUT = "PUT"
|
|
25
|
+
}
|
|
26
|
+
export declare enum LogLineOrderByDirection {
|
|
27
|
+
Asc = "asc",
|
|
28
|
+
Desc = "desc"
|
|
29
|
+
}
|
|
30
|
+
export declare enum LogLineOrderByField {
|
|
31
|
+
CreatedAt = "createdAt"
|
|
32
|
+
}
|
|
33
|
+
export declare enum LogLineLevel {
|
|
34
|
+
DEBUG = "DEBUG",
|
|
35
|
+
INFO = "INFO",
|
|
36
|
+
WARN = "WARN",
|
|
37
|
+
ERROR = "ERROR"
|
|
38
|
+
}
|
|
39
|
+
export declare enum PullRequestState {
|
|
40
|
+
Open = "open",
|
|
41
|
+
Closed = "closed"
|
|
42
|
+
}
|
|
43
|
+
export declare enum WorkerRuntimeSDKs {
|
|
44
|
+
GOLANG = "GOLANG",
|
|
45
|
+
PYTHON = "PYTHON",
|
|
46
|
+
TYPESCRIPT = "TYPESCRIPT"
|
|
47
|
+
}
|
|
48
|
+
export declare enum StepRunEventSeverity {
|
|
49
|
+
INFO = "INFO",
|
|
50
|
+
WARNING = "WARNING",
|
|
51
|
+
CRITICAL = "CRITICAL"
|
|
52
|
+
}
|
|
53
|
+
export declare enum StepRunEventReason {
|
|
54
|
+
REQUEUED_NO_WORKER = "REQUEUED_NO_WORKER",
|
|
55
|
+
REQUEUED_RATE_LIMIT = "REQUEUED_RATE_LIMIT",
|
|
56
|
+
SCHEDULING_TIMED_OUT = "SCHEDULING_TIMED_OUT",
|
|
57
|
+
ASSIGNED = "ASSIGNED",
|
|
58
|
+
STARTED = "STARTED",
|
|
59
|
+
ACKNOWLEDGED = "ACKNOWLEDGED",
|
|
60
|
+
FINISHED = "FINISHED",
|
|
61
|
+
FAILED = "FAILED",
|
|
62
|
+
RETRYING = "RETRYING",
|
|
63
|
+
CANCELLED = "CANCELLED",
|
|
64
|
+
TIMEOUT_REFRESHED = "TIMEOUT_REFRESHED",
|
|
65
|
+
REASSIGNED = "REASSIGNED",
|
|
66
|
+
TIMED_OUT = "TIMED_OUT",
|
|
67
|
+
SLOT_RELEASED = "SLOT_RELEASED",
|
|
68
|
+
RETRIED_BY_USER = "RETRIED_BY_USER",
|
|
69
|
+
WORKFLOW_RUN_GROUP_KEY_SUCCEEDED = "WORKFLOW_RUN_GROUP_KEY_SUCCEEDED",
|
|
70
|
+
WORKFLOW_RUN_GROUP_KEY_FAILED = "WORKFLOW_RUN_GROUP_KEY_FAILED"
|
|
71
|
+
}
|
|
72
|
+
export declare enum StepRunStatus {
|
|
73
|
+
PENDING = "PENDING",
|
|
74
|
+
PENDING_ASSIGNMENT = "PENDING_ASSIGNMENT",
|
|
75
|
+
ASSIGNED = "ASSIGNED",
|
|
76
|
+
RUNNING = "RUNNING",
|
|
77
|
+
SUCCEEDED = "SUCCEEDED",
|
|
78
|
+
FAILED = "FAILED",
|
|
79
|
+
CANCELLED = "CANCELLED",
|
|
80
|
+
CANCELLING = "CANCELLING",
|
|
81
|
+
BACKOFF = "BACKOFF"
|
|
82
|
+
}
|
|
83
|
+
export declare enum JobRunStatus {
|
|
84
|
+
PENDING = "PENDING",
|
|
85
|
+
RUNNING = "RUNNING",
|
|
86
|
+
SUCCEEDED = "SUCCEEDED",
|
|
87
|
+
FAILED = "FAILED",
|
|
88
|
+
CANCELLED = "CANCELLED",
|
|
89
|
+
BACKOFF = "BACKOFF"
|
|
90
|
+
}
|
|
91
|
+
export declare enum WorkflowKind {
|
|
92
|
+
FUNCTION = "FUNCTION",
|
|
93
|
+
DURABLE = "DURABLE",
|
|
94
|
+
DAG = "DAG"
|
|
95
|
+
}
|
|
96
|
+
export declare enum WorkflowRunStatus {
|
|
97
|
+
PENDING = "PENDING",
|
|
98
|
+
RUNNING = "RUNNING",
|
|
99
|
+
SUCCEEDED = "SUCCEEDED",
|
|
100
|
+
FAILED = "FAILED",
|
|
101
|
+
CANCELLED = "CANCELLED",
|
|
102
|
+
QUEUED = "QUEUED",
|
|
103
|
+
BACKOFF = "BACKOFF"
|
|
104
|
+
}
|
|
105
|
+
export declare enum WorkflowRunOrderByDirection {
|
|
106
|
+
ASC = "ASC",
|
|
107
|
+
DESC = "DESC"
|
|
108
|
+
}
|
|
109
|
+
export declare enum WorkflowRunOrderByField {
|
|
110
|
+
CreatedAt = "createdAt",
|
|
111
|
+
StartedAt = "startedAt",
|
|
112
|
+
FinishedAt = "finishedAt",
|
|
113
|
+
Duration = "duration"
|
|
114
|
+
}
|
|
115
|
+
export declare enum CronWorkflowsOrderByField {
|
|
116
|
+
Name = "name",
|
|
117
|
+
CreatedAt = "createdAt"
|
|
118
|
+
}
|
|
119
|
+
export declare enum ScheduledRunStatus {
|
|
120
|
+
PENDING = "PENDING",
|
|
121
|
+
RUNNING = "RUNNING",
|
|
122
|
+
SUCCEEDED = "SUCCEEDED",
|
|
123
|
+
FAILED = "FAILED",
|
|
124
|
+
CANCELLED = "CANCELLED",
|
|
125
|
+
QUEUED = "QUEUED",
|
|
126
|
+
SCHEDULED = "SCHEDULED"
|
|
127
|
+
}
|
|
128
|
+
export declare enum ScheduledWorkflowsOrderByField {
|
|
129
|
+
TriggerAt = "triggerAt",
|
|
130
|
+
CreatedAt = "createdAt"
|
|
131
|
+
}
|
|
132
|
+
export declare enum RateLimitOrderByDirection {
|
|
133
|
+
Asc = "asc",
|
|
134
|
+
Desc = "desc"
|
|
135
|
+
}
|
|
136
|
+
export declare enum RateLimitOrderByField {
|
|
137
|
+
Key = "key",
|
|
138
|
+
Value = "value",
|
|
139
|
+
LimitValue = "limitValue"
|
|
140
|
+
}
|
|
141
|
+
export declare enum EventOrderByDirection {
|
|
142
|
+
Asc = "asc",
|
|
143
|
+
Desc = "desc"
|
|
144
|
+
}
|
|
145
|
+
export declare enum EventOrderByField {
|
|
146
|
+
CreatedAt = "createdAt"
|
|
147
|
+
}
|
|
148
|
+
export declare enum TenantResource {
|
|
149
|
+
WORKER = "WORKER",
|
|
150
|
+
WORKER_SLOT = "WORKER_SLOT",
|
|
151
|
+
EVENT = "EVENT",
|
|
152
|
+
WORKFLOW_RUN = "WORKFLOW_RUN",
|
|
153
|
+
TASK_RUN = "TASK_RUN",
|
|
154
|
+
CRON = "CRON",
|
|
155
|
+
SCHEDULE = "SCHEDULE"
|
|
156
|
+
}
|
|
157
|
+
export declare enum TenantMemberRole {
|
|
158
|
+
OWNER = "OWNER",
|
|
159
|
+
ADMIN = "ADMIN",
|
|
160
|
+
MEMBER = "MEMBER"
|
|
161
|
+
}
|
|
1
162
|
export interface APIMeta {
|
|
2
163
|
auth?: APIMetaAuth;
|
|
3
164
|
/**
|
|
@@ -114,13 +275,13 @@ export interface APIResourceMeta {
|
|
|
114
275
|
/**
|
|
115
276
|
* the time that this resource was created
|
|
116
277
|
* @format date-time
|
|
117
|
-
* @example "2022-12-
|
|
278
|
+
* @example "2022-12-13T15:06:48.888358-05:00"
|
|
118
279
|
*/
|
|
119
280
|
createdAt: string;
|
|
120
281
|
/**
|
|
121
282
|
* the time that this resource was last updated
|
|
122
283
|
* @format date-time
|
|
123
|
-
* @example "2022-12-
|
|
284
|
+
* @example "2022-12-13T15:06:48.888358-05:00"
|
|
124
285
|
*/
|
|
125
286
|
updatedAt: string;
|
|
126
287
|
}
|
|
@@ -205,20 +366,6 @@ export interface TenantMemberList {
|
|
|
205
366
|
pagination?: PaginationResponse;
|
|
206
367
|
rows?: TenantMember[];
|
|
207
368
|
}
|
|
208
|
-
export declare enum TenantMemberRole {
|
|
209
|
-
OWNER = "OWNER",
|
|
210
|
-
ADMIN = "ADMIN",
|
|
211
|
-
MEMBER = "MEMBER"
|
|
212
|
-
}
|
|
213
|
-
export declare enum TenantResource {
|
|
214
|
-
WORKER = "WORKER",
|
|
215
|
-
WORKER_SLOT = "WORKER_SLOT",
|
|
216
|
-
EVENT = "EVENT",
|
|
217
|
-
WORKFLOW_RUN = "WORKFLOW_RUN",
|
|
218
|
-
TASK_RUN = "TASK_RUN",
|
|
219
|
-
CRON = "CRON",
|
|
220
|
-
SCHEDULE = "SCHEDULE"
|
|
221
|
-
}
|
|
222
369
|
export interface TenantResourceLimit {
|
|
223
370
|
metadata: APIResourceMeta;
|
|
224
371
|
/** The resource associated with this limit. */
|
|
@@ -432,13 +579,6 @@ export interface EventWorkflowRunSummary {
|
|
|
432
579
|
*/
|
|
433
580
|
cancelled?: number;
|
|
434
581
|
}
|
|
435
|
-
export declare enum EventOrderByField {
|
|
436
|
-
CreatedAt = "createdAt"
|
|
437
|
-
}
|
|
438
|
-
export declare enum EventOrderByDirection {
|
|
439
|
-
Asc = "asc",
|
|
440
|
-
Desc = "desc"
|
|
441
|
-
}
|
|
442
582
|
export type EventSearch = string;
|
|
443
583
|
export interface EventKeyList {
|
|
444
584
|
pagination?: PaginationResponse;
|
|
@@ -466,7 +606,7 @@ export interface RateLimit {
|
|
|
466
606
|
/**
|
|
467
607
|
* The last time the rate limit was refilled.
|
|
468
608
|
* @format date-time
|
|
469
|
-
* @example "2022-12-
|
|
609
|
+
* @example "2022-12-13T15:06:48.888358-05:00"
|
|
470
610
|
*/
|
|
471
611
|
lastRefill: string;
|
|
472
612
|
}
|
|
@@ -474,15 +614,6 @@ export interface RateLimitList {
|
|
|
474
614
|
pagination?: PaginationResponse;
|
|
475
615
|
rows?: RateLimit[];
|
|
476
616
|
}
|
|
477
|
-
export declare enum RateLimitOrderByField {
|
|
478
|
-
Key = "key",
|
|
479
|
-
Value = "value",
|
|
480
|
-
LimitValue = "limitValue"
|
|
481
|
-
}
|
|
482
|
-
export declare enum RateLimitOrderByDirection {
|
|
483
|
-
Asc = "asc",
|
|
484
|
-
Desc = "desc"
|
|
485
|
-
}
|
|
486
617
|
export interface ReplayEventRequest {
|
|
487
618
|
eventIds: string[];
|
|
488
619
|
}
|
|
@@ -705,24 +836,17 @@ export interface ScheduledWorkflows {
|
|
|
705
836
|
*/
|
|
706
837
|
workflowRunId?: string;
|
|
707
838
|
method: 'DEFAULT' | 'API';
|
|
839
|
+
/**
|
|
840
|
+
* @format int32
|
|
841
|
+
* @min 1
|
|
842
|
+
* @max 3
|
|
843
|
+
*/
|
|
844
|
+
priority?: number;
|
|
708
845
|
}
|
|
709
846
|
export interface ScheduledWorkflowsList {
|
|
710
847
|
rows?: ScheduledWorkflows[];
|
|
711
848
|
pagination?: PaginationResponse;
|
|
712
849
|
}
|
|
713
|
-
export declare enum ScheduledWorkflowsOrderByField {
|
|
714
|
-
TriggerAt = "triggerAt",
|
|
715
|
-
CreatedAt = "createdAt"
|
|
716
|
-
}
|
|
717
|
-
export declare enum ScheduledRunStatus {
|
|
718
|
-
PENDING = "PENDING",
|
|
719
|
-
RUNNING = "RUNNING",
|
|
720
|
-
SUCCEEDED = "SUCCEEDED",
|
|
721
|
-
FAILED = "FAILED",
|
|
722
|
-
CANCELLED = "CANCELLED",
|
|
723
|
-
QUEUED = "QUEUED",
|
|
724
|
-
SCHEDULED = "SCHEDULED"
|
|
725
|
-
}
|
|
726
850
|
export interface CronWorkflows {
|
|
727
851
|
metadata: APIResourceMeta;
|
|
728
852
|
tenantId: string;
|
|
@@ -735,25 +859,17 @@ export interface CronWorkflows {
|
|
|
735
859
|
additionalMetadata?: Record<string, any>;
|
|
736
860
|
enabled: boolean;
|
|
737
861
|
method: 'DEFAULT' | 'API';
|
|
862
|
+
/**
|
|
863
|
+
* @format int32
|
|
864
|
+
* @min 1
|
|
865
|
+
* @max 3
|
|
866
|
+
*/
|
|
867
|
+
priority?: number;
|
|
738
868
|
}
|
|
739
869
|
export interface CronWorkflowsList {
|
|
740
870
|
rows?: CronWorkflows[];
|
|
741
871
|
pagination?: PaginationResponse;
|
|
742
872
|
}
|
|
743
|
-
export declare enum CronWorkflowsOrderByField {
|
|
744
|
-
Name = "name",
|
|
745
|
-
CreatedAt = "createdAt"
|
|
746
|
-
}
|
|
747
|
-
export declare enum WorkflowRunOrderByField {
|
|
748
|
-
CreatedAt = "createdAt",
|
|
749
|
-
StartedAt = "startedAt",
|
|
750
|
-
FinishedAt = "finishedAt",
|
|
751
|
-
Duration = "duration"
|
|
752
|
-
}
|
|
753
|
-
export declare enum WorkflowRunOrderByDirection {
|
|
754
|
-
ASC = "ASC",
|
|
755
|
-
DESC = "DESC"
|
|
756
|
-
}
|
|
757
873
|
export interface WorkflowRunsMetrics {
|
|
758
874
|
counts?: WorkflowRunsMetricsCounts;
|
|
759
875
|
}
|
|
@@ -765,44 +881,11 @@ export interface WorkflowRunsMetricsCounts {
|
|
|
765
881
|
QUEUED?: number;
|
|
766
882
|
CANCELLED?: number;
|
|
767
883
|
}
|
|
768
|
-
export declare enum WorkflowRunStatus {
|
|
769
|
-
PENDING = "PENDING",
|
|
770
|
-
RUNNING = "RUNNING",
|
|
771
|
-
SUCCEEDED = "SUCCEEDED",
|
|
772
|
-
FAILED = "FAILED",
|
|
773
|
-
CANCELLED = "CANCELLED",
|
|
774
|
-
QUEUED = "QUEUED",
|
|
775
|
-
BACKOFF = "BACKOFF"
|
|
776
|
-
}
|
|
777
884
|
export type WorkflowRunStatusList = WorkflowRunStatus[];
|
|
778
|
-
export declare enum WorkflowKind {
|
|
779
|
-
FUNCTION = "FUNCTION",
|
|
780
|
-
DURABLE = "DURABLE",
|
|
781
|
-
DAG = "DAG"
|
|
782
|
-
}
|
|
783
885
|
export type WorkflowKindList = WorkflowKind[];
|
|
784
886
|
export interface WorkflowRunsCancelRequest {
|
|
785
887
|
workflowRunIds: string[];
|
|
786
888
|
}
|
|
787
|
-
export declare enum JobRunStatus {
|
|
788
|
-
PENDING = "PENDING",
|
|
789
|
-
RUNNING = "RUNNING",
|
|
790
|
-
SUCCEEDED = "SUCCEEDED",
|
|
791
|
-
FAILED = "FAILED",
|
|
792
|
-
CANCELLED = "CANCELLED",
|
|
793
|
-
BACKOFF = "BACKOFF"
|
|
794
|
-
}
|
|
795
|
-
export declare enum StepRunStatus {
|
|
796
|
-
PENDING = "PENDING",
|
|
797
|
-
PENDING_ASSIGNMENT = "PENDING_ASSIGNMENT",
|
|
798
|
-
ASSIGNED = "ASSIGNED",
|
|
799
|
-
RUNNING = "RUNNING",
|
|
800
|
-
SUCCEEDED = "SUCCEEDED",
|
|
801
|
-
FAILED = "FAILED",
|
|
802
|
-
CANCELLED = "CANCELLED",
|
|
803
|
-
CANCELLING = "CANCELLING",
|
|
804
|
-
BACKOFF = "BACKOFF"
|
|
805
|
-
}
|
|
806
889
|
export interface JobRun {
|
|
807
890
|
metadata: APIResourceMeta;
|
|
808
891
|
tenantId: string;
|
|
@@ -865,30 +948,6 @@ export interface StepRun {
|
|
|
865
948
|
cancelledReason?: string;
|
|
866
949
|
cancelledError?: string;
|
|
867
950
|
}
|
|
868
|
-
export declare enum StepRunEventReason {
|
|
869
|
-
REQUEUED_NO_WORKER = "REQUEUED_NO_WORKER",
|
|
870
|
-
REQUEUED_RATE_LIMIT = "REQUEUED_RATE_LIMIT",
|
|
871
|
-
SCHEDULING_TIMED_OUT = "SCHEDULING_TIMED_OUT",
|
|
872
|
-
ASSIGNED = "ASSIGNED",
|
|
873
|
-
STARTED = "STARTED",
|
|
874
|
-
ACKNOWLEDGED = "ACKNOWLEDGED",
|
|
875
|
-
FINISHED = "FINISHED",
|
|
876
|
-
FAILED = "FAILED",
|
|
877
|
-
RETRYING = "RETRYING",
|
|
878
|
-
CANCELLED = "CANCELLED",
|
|
879
|
-
TIMEOUT_REFRESHED = "TIMEOUT_REFRESHED",
|
|
880
|
-
REASSIGNED = "REASSIGNED",
|
|
881
|
-
TIMED_OUT = "TIMED_OUT",
|
|
882
|
-
SLOT_RELEASED = "SLOT_RELEASED",
|
|
883
|
-
RETRIED_BY_USER = "RETRIED_BY_USER",
|
|
884
|
-
WORKFLOW_RUN_GROUP_KEY_SUCCEEDED = "WORKFLOW_RUN_GROUP_KEY_SUCCEEDED",
|
|
885
|
-
WORKFLOW_RUN_GROUP_KEY_FAILED = "WORKFLOW_RUN_GROUP_KEY_FAILED"
|
|
886
|
-
}
|
|
887
|
-
export declare enum StepRunEventSeverity {
|
|
888
|
-
INFO = "INFO",
|
|
889
|
-
WARNING = "WARNING",
|
|
890
|
-
CRITICAL = "CRITICAL"
|
|
891
|
-
}
|
|
892
951
|
export interface StepRunEvent {
|
|
893
952
|
id: number;
|
|
894
953
|
/** @format date-time */
|
|
@@ -942,11 +1001,6 @@ export interface WorkerRuntimeInfo {
|
|
|
942
1001
|
os?: string;
|
|
943
1002
|
runtimeExtra?: string;
|
|
944
1003
|
}
|
|
945
|
-
export declare enum WorkerRuntimeSDKs {
|
|
946
|
-
GOLANG = "GOLANG",
|
|
947
|
-
PYTHON = "PYTHON",
|
|
948
|
-
TYPESCRIPT = "TYPESCRIPT"
|
|
949
|
-
}
|
|
950
1004
|
export interface WorkerList {
|
|
951
1005
|
pagination?: PaginationResponse;
|
|
952
1006
|
rows?: Worker[];
|
|
@@ -998,13 +1052,13 @@ export interface Worker {
|
|
|
998
1052
|
/**
|
|
999
1053
|
* The time this worker last sent a heartbeat.
|
|
1000
1054
|
* @format date-time
|
|
1001
|
-
* @example "2022-12-
|
|
1055
|
+
* @example "2022-12-13T15:06:48.888358-05:00"
|
|
1002
1056
|
*/
|
|
1003
1057
|
lastHeartbeatAt?: string;
|
|
1004
1058
|
/**
|
|
1005
1059
|
* The time this worker last sent a heartbeat.
|
|
1006
1060
|
* @format date-time
|
|
1007
|
-
* @example "2022-12-
|
|
1061
|
+
* @example "2022-12-13T15:06:48.888358-05:00"
|
|
1008
1062
|
*/
|
|
1009
1063
|
lastListenerEstablished?: string;
|
|
1010
1064
|
/** The actions this worker can perform. */
|
|
@@ -1091,12 +1145,24 @@ export interface ScheduleWorkflowRunRequest {
|
|
|
1091
1145
|
additionalMetadata: object;
|
|
1092
1146
|
/** @format date-time */
|
|
1093
1147
|
triggerAt: string;
|
|
1148
|
+
/**
|
|
1149
|
+
* @format int32
|
|
1150
|
+
* @min 1
|
|
1151
|
+
* @max 3
|
|
1152
|
+
*/
|
|
1153
|
+
priority?: number;
|
|
1094
1154
|
}
|
|
1095
1155
|
export interface CreateCronWorkflowTriggerRequest {
|
|
1096
1156
|
input: object;
|
|
1097
1157
|
additionalMetadata: object;
|
|
1098
1158
|
cronName: string;
|
|
1099
1159
|
cronExpression: string;
|
|
1160
|
+
/**
|
|
1161
|
+
* @format int32
|
|
1162
|
+
* @min 1
|
|
1163
|
+
* @max 3
|
|
1164
|
+
*/
|
|
1165
|
+
priority?: number;
|
|
1100
1166
|
}
|
|
1101
1167
|
export interface CreatePullRequestFromStepRun {
|
|
1102
1168
|
branchName: string;
|
|
@@ -1122,10 +1188,6 @@ export interface PullRequest {
|
|
|
1122
1188
|
pullRequestBaseBranch: string;
|
|
1123
1189
|
pullRequestState: PullRequestState;
|
|
1124
1190
|
}
|
|
1125
|
-
export declare enum PullRequestState {
|
|
1126
|
-
Open = "open",
|
|
1127
|
-
Closed = "closed"
|
|
1128
|
-
}
|
|
1129
1191
|
export interface LogLine {
|
|
1130
1192
|
/**
|
|
1131
1193
|
* The creation date of the log line.
|
|
@@ -1137,23 +1199,10 @@ export interface LogLine {
|
|
|
1137
1199
|
/** The log metadata. */
|
|
1138
1200
|
metadata: object;
|
|
1139
1201
|
}
|
|
1140
|
-
export declare enum LogLineLevel {
|
|
1141
|
-
DEBUG = "DEBUG",
|
|
1142
|
-
INFO = "INFO",
|
|
1143
|
-
WARN = "WARN",
|
|
1144
|
-
ERROR = "ERROR"
|
|
1145
|
-
}
|
|
1146
1202
|
export interface LogLineList {
|
|
1147
1203
|
pagination?: PaginationResponse;
|
|
1148
1204
|
rows?: LogLine[];
|
|
1149
1205
|
}
|
|
1150
|
-
export declare enum LogLineOrderByField {
|
|
1151
|
-
CreatedAt = "createdAt"
|
|
1152
|
-
}
|
|
1153
|
-
export declare enum LogLineOrderByDirection {
|
|
1154
|
-
Asc = "asc",
|
|
1155
|
-
Desc = "desc"
|
|
1156
|
-
}
|
|
1157
1206
|
export type LogLineSearch = string;
|
|
1158
1207
|
export type LogLineLevelField = LogLineLevel[];
|
|
1159
1208
|
export interface SNSIntegration {
|
|
@@ -1209,11 +1258,6 @@ export interface WebhookWorker {
|
|
|
1209
1258
|
/** The webhook url. */
|
|
1210
1259
|
url: string;
|
|
1211
1260
|
}
|
|
1212
|
-
export declare enum WebhookWorkerRequestMethod {
|
|
1213
|
-
GET = "GET",
|
|
1214
|
-
POST = "POST",
|
|
1215
|
-
PUT = "PUT"
|
|
1216
|
-
}
|
|
1217
1261
|
export interface WebhookWorkerRequest {
|
|
1218
1262
|
/**
|
|
1219
1263
|
* The date and time the request was created.
|
|
@@ -1272,7 +1316,7 @@ export interface V1WorkflowRunDisplayNameList {
|
|
|
1272
1316
|
export interface V1TaskSummary {
|
|
1273
1317
|
metadata: APIResourceMeta;
|
|
1274
1318
|
/** The action ID of the task. */
|
|
1275
|
-
actionId
|
|
1319
|
+
actionId?: string;
|
|
1276
1320
|
/** Additional metadata for the task run. */
|
|
1277
1321
|
additionalMetadata?: object;
|
|
1278
1322
|
/** The list of children tasks */
|
|
@@ -1372,13 +1416,6 @@ export interface V1TaskEventList {
|
|
|
1372
1416
|
taskDisplayName?: string;
|
|
1373
1417
|
}[];
|
|
1374
1418
|
}
|
|
1375
|
-
export declare enum V1TaskStatus {
|
|
1376
|
-
QUEUED = "QUEUED",
|
|
1377
|
-
RUNNING = "RUNNING",
|
|
1378
|
-
COMPLETED = "COMPLETED",
|
|
1379
|
-
CANCELLED = "CANCELLED",
|
|
1380
|
-
FAILED = "FAILED"
|
|
1381
|
-
}
|
|
1382
1419
|
export type V1TaskRunMetrics = {
|
|
1383
1420
|
status: V1TaskStatus;
|
|
1384
1421
|
count: number;
|
|
@@ -1485,18 +1522,13 @@ export interface V1WorkflowRunDetails {
|
|
|
1485
1522
|
}[];
|
|
1486
1523
|
tasks: V1TaskSummary[];
|
|
1487
1524
|
}
|
|
1488
|
-
export declare enum V1TaskRunStatus {
|
|
1489
|
-
PENDING = "PENDING",
|
|
1490
|
-
RUNNING = "RUNNING",
|
|
1491
|
-
COMPLETED = "COMPLETED",
|
|
1492
|
-
FAILED = "FAILED",
|
|
1493
|
-
CANCELLED = "CANCELLED"
|
|
1494
|
-
}
|
|
1495
1525
|
export interface V1TriggerWorkflowRunRequest {
|
|
1496
1526
|
/** The name of the workflow. */
|
|
1497
1527
|
workflowName: string;
|
|
1498
1528
|
input: object;
|
|
1499
1529
|
additionalMetadata?: object;
|
|
1530
|
+
/** The priority of the workflow run. */
|
|
1531
|
+
priority?: number;
|
|
1500
1532
|
}
|
|
1501
1533
|
export interface V1LogLine {
|
|
1502
1534
|
/**
|
|
@@ -1509,12 +1541,6 @@ export interface V1LogLine {
|
|
|
1509
1541
|
/** The log metadata. */
|
|
1510
1542
|
metadata: object;
|
|
1511
1543
|
}
|
|
1512
|
-
export declare enum V1LogLineLevel {
|
|
1513
|
-
DEBUG = "DEBUG",
|
|
1514
|
-
INFO = "INFO",
|
|
1515
|
-
WARN = "WARN",
|
|
1516
|
-
ERROR = "ERROR"
|
|
1517
|
-
}
|
|
1518
1544
|
export interface V1LogLineList {
|
|
1519
1545
|
pagination?: PaginationResponse;
|
|
1520
1546
|
rows?: V1LogLine[];
|