@hatchet-dev/typescript-sdk 1.10.4 → 1.10.6

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.
@@ -11,84 +11,38 @@
11
11
  * ---------------------------------------------------------------
12
12
  */
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.V1CELDebugResponseStatus = exports.V1LogLineLevel = exports.V1TaskRunStatus = exports.V1TaskStatus = exports.WebhookWorkerRequestMethod = exports.LogLineOrderByDirection = exports.LogLineOrderByField = exports.LogLineLevel = exports.PullRequestState = exports.WorkerRuntimeSDKs = exports.StepRunEventSeverity = exports.StepRunEventReason = exports.StepRunStatus = exports.JobRunStatus = exports.WorkflowKind = exports.WorkflowRunStatus = exports.WorkflowRunOrderByDirection = exports.WorkflowRunOrderByField = exports.CronWorkflowsOrderByField = exports.ScheduledRunStatus = exports.ScheduledWorkflowsOrderByField = exports.RateLimitOrderByDirection = exports.RateLimitOrderByField = exports.V1WebhookAuthType = exports.V1WebhookSourceName = exports.EventOrderByDirection = exports.EventOrderByField = exports.TenantResource = exports.TenantMemberRole = exports.TenantEnvironment = void 0;
15
- var TenantEnvironment;
16
- (function (TenantEnvironment) {
17
- TenantEnvironment["Local"] = "local";
18
- TenantEnvironment["Development"] = "development";
19
- TenantEnvironment["Production"] = "production";
20
- })(TenantEnvironment || (exports.TenantEnvironment = TenantEnvironment = {}));
21
- var TenantMemberRole;
22
- (function (TenantMemberRole) {
23
- TenantMemberRole["OWNER"] = "OWNER";
24
- TenantMemberRole["ADMIN"] = "ADMIN";
25
- TenantMemberRole["MEMBER"] = "MEMBER";
26
- })(TenantMemberRole || (exports.TenantMemberRole = TenantMemberRole = {}));
27
- var TenantResource;
28
- (function (TenantResource) {
29
- TenantResource["WORKER"] = "WORKER";
30
- TenantResource["WORKER_SLOT"] = "WORKER_SLOT";
31
- TenantResource["EVENT"] = "EVENT";
32
- TenantResource["WORKFLOW_RUN"] = "WORKFLOW_RUN";
33
- TenantResource["TASK_RUN"] = "TASK_RUN";
34
- TenantResource["CRON"] = "CRON";
35
- TenantResource["SCHEDULE"] = "SCHEDULE";
36
- TenantResource["INCOMING_WEBHOOK"] = "INCOMING_WEBHOOK";
37
- })(TenantResource || (exports.TenantResource = TenantResource = {}));
38
- var EventOrderByField;
39
- (function (EventOrderByField) {
40
- EventOrderByField["CreatedAt"] = "createdAt";
41
- })(EventOrderByField || (exports.EventOrderByField = EventOrderByField = {}));
42
- var EventOrderByDirection;
43
- (function (EventOrderByDirection) {
44
- EventOrderByDirection["Asc"] = "asc";
45
- EventOrderByDirection["Desc"] = "desc";
46
- })(EventOrderByDirection || (exports.EventOrderByDirection = EventOrderByDirection = {}));
47
- var V1WebhookSourceName;
48
- (function (V1WebhookSourceName) {
49
- V1WebhookSourceName["GENERIC"] = "GENERIC";
50
- V1WebhookSourceName["GITHUB"] = "GITHUB";
51
- V1WebhookSourceName["STRIPE"] = "STRIPE";
52
- V1WebhookSourceName["SLACK"] = "SLACK";
53
- V1WebhookSourceName["LINEAR"] = "LINEAR";
54
- })(V1WebhookSourceName || (exports.V1WebhookSourceName = V1WebhookSourceName = {}));
55
- var V1WebhookAuthType;
56
- (function (V1WebhookAuthType) {
57
- V1WebhookAuthType["BASIC"] = "BASIC";
58
- V1WebhookAuthType["API_KEY"] = "API_KEY";
59
- V1WebhookAuthType["HMAC"] = "HMAC";
60
- })(V1WebhookAuthType || (exports.V1WebhookAuthType = V1WebhookAuthType = {}));
61
- var RateLimitOrderByField;
62
- (function (RateLimitOrderByField) {
63
- RateLimitOrderByField["Key"] = "key";
64
- RateLimitOrderByField["Value"] = "value";
65
- RateLimitOrderByField["LimitValue"] = "limitValue";
66
- })(RateLimitOrderByField || (exports.RateLimitOrderByField = RateLimitOrderByField = {}));
67
- var RateLimitOrderByDirection;
68
- (function (RateLimitOrderByDirection) {
69
- RateLimitOrderByDirection["Asc"] = "asc";
70
- RateLimitOrderByDirection["Desc"] = "desc";
71
- })(RateLimitOrderByDirection || (exports.RateLimitOrderByDirection = RateLimitOrderByDirection = {}));
72
- var ScheduledWorkflowsOrderByField;
73
- (function (ScheduledWorkflowsOrderByField) {
74
- ScheduledWorkflowsOrderByField["TriggerAt"] = "triggerAt";
75
- ScheduledWorkflowsOrderByField["CreatedAt"] = "createdAt";
76
- })(ScheduledWorkflowsOrderByField || (exports.ScheduledWorkflowsOrderByField = ScheduledWorkflowsOrderByField = {}));
77
- var ScheduledRunStatus;
78
- (function (ScheduledRunStatus) {
79
- ScheduledRunStatus["PENDING"] = "PENDING";
80
- ScheduledRunStatus["RUNNING"] = "RUNNING";
81
- ScheduledRunStatus["SUCCEEDED"] = "SUCCEEDED";
82
- ScheduledRunStatus["FAILED"] = "FAILED";
83
- ScheduledRunStatus["CANCELLED"] = "CANCELLED";
84
- ScheduledRunStatus["QUEUED"] = "QUEUED";
85
- ScheduledRunStatus["SCHEDULED"] = "SCHEDULED";
86
- })(ScheduledRunStatus || (exports.ScheduledRunStatus = ScheduledRunStatus = {}));
87
- var CronWorkflowsOrderByField;
88
- (function (CronWorkflowsOrderByField) {
89
- CronWorkflowsOrderByField["Name"] = "name";
90
- CronWorkflowsOrderByField["CreatedAt"] = "createdAt";
91
- })(CronWorkflowsOrderByField || (exports.CronWorkflowsOrderByField = CronWorkflowsOrderByField = {}));
14
+ exports.V1TaskStatus = exports.V1WorkflowType = exports.V1TaskEventType = exports.V1LogLineLevel = exports.TenantVersion = exports.TenantEnvironment = exports.V1WebhookSourceName = exports.V1WebhookAuthType = exports.V1WebhookHMACAlgorithm = exports.V1WebhookHMACEncoding = exports.V1CELDebugResponseStatus = exports.TenantResource = exports.TenantMemberRole = exports.WorkflowRunStatus = exports.EventOrderByField = exports.EventOrderByDirection = exports.RateLimitOrderByField = exports.RateLimitOrderByDirection = exports.ScheduledWorkflowsMethod = exports.ScheduledWorkflowsOrderByField = exports.WorkflowRunOrderByDirection = exports.ScheduledRunStatus = exports.CronWorkflowsMethod = exports.CronWorkflowsOrderByField = exports.ConcurrencyLimitStrategy = exports.StepRunStatus = exports.JobRunStatus = exports.LogLineLevel = exports.LogLineOrderByField = exports.LogLineOrderByDirection = exports.StepRunEventReason = exports.StepRunEventSeverity = exports.WorkflowKind = exports.WorkflowRunOrderByField = exports.WorkerType = exports.WorkerRuntimeSDKs = exports.WebhookWorkerRequestMethod = exports.PullRequestState = exports.V1TaskRunStatus = void 0;
15
+ var V1TaskRunStatus;
16
+ (function (V1TaskRunStatus) {
17
+ V1TaskRunStatus["PENDING"] = "PENDING";
18
+ V1TaskRunStatus["RUNNING"] = "RUNNING";
19
+ V1TaskRunStatus["COMPLETED"] = "COMPLETED";
20
+ V1TaskRunStatus["FAILED"] = "FAILED";
21
+ V1TaskRunStatus["CANCELLED"] = "CANCELLED";
22
+ })(V1TaskRunStatus || (exports.V1TaskRunStatus = V1TaskRunStatus = {}));
23
+ var PullRequestState;
24
+ (function (PullRequestState) {
25
+ PullRequestState["Open"] = "open";
26
+ PullRequestState["Closed"] = "closed";
27
+ })(PullRequestState || (exports.PullRequestState = PullRequestState = {}));
28
+ var WebhookWorkerRequestMethod;
29
+ (function (WebhookWorkerRequestMethod) {
30
+ WebhookWorkerRequestMethod["GET"] = "GET";
31
+ WebhookWorkerRequestMethod["POST"] = "POST";
32
+ WebhookWorkerRequestMethod["PUT"] = "PUT";
33
+ })(WebhookWorkerRequestMethod || (exports.WebhookWorkerRequestMethod = WebhookWorkerRequestMethod = {}));
34
+ var WorkerRuntimeSDKs;
35
+ (function (WorkerRuntimeSDKs) {
36
+ WorkerRuntimeSDKs["GOLANG"] = "GOLANG";
37
+ WorkerRuntimeSDKs["PYTHON"] = "PYTHON";
38
+ WorkerRuntimeSDKs["TYPESCRIPT"] = "TYPESCRIPT";
39
+ })(WorkerRuntimeSDKs || (exports.WorkerRuntimeSDKs = WorkerRuntimeSDKs = {}));
40
+ var WorkerType;
41
+ (function (WorkerType) {
42
+ WorkerType["SELFHOSTED"] = "SELFHOSTED";
43
+ WorkerType["MANAGED"] = "MANAGED";
44
+ WorkerType["WEBHOOK"] = "WEBHOOK";
45
+ })(WorkerType || (exports.WorkerType = WorkerType = {}));
92
46
  var WorkflowRunOrderByField;
93
47
  (function (WorkflowRunOrderByField) {
94
48
  WorkflowRunOrderByField["CreatedAt"] = "createdAt";
@@ -96,48 +50,18 @@ var WorkflowRunOrderByField;
96
50
  WorkflowRunOrderByField["FinishedAt"] = "finishedAt";
97
51
  WorkflowRunOrderByField["Duration"] = "duration";
98
52
  })(WorkflowRunOrderByField || (exports.WorkflowRunOrderByField = WorkflowRunOrderByField = {}));
99
- var WorkflowRunOrderByDirection;
100
- (function (WorkflowRunOrderByDirection) {
101
- WorkflowRunOrderByDirection["ASC"] = "ASC";
102
- WorkflowRunOrderByDirection["DESC"] = "DESC";
103
- })(WorkflowRunOrderByDirection || (exports.WorkflowRunOrderByDirection = WorkflowRunOrderByDirection = {}));
104
- var WorkflowRunStatus;
105
- (function (WorkflowRunStatus) {
106
- WorkflowRunStatus["PENDING"] = "PENDING";
107
- WorkflowRunStatus["RUNNING"] = "RUNNING";
108
- WorkflowRunStatus["SUCCEEDED"] = "SUCCEEDED";
109
- WorkflowRunStatus["FAILED"] = "FAILED";
110
- WorkflowRunStatus["CANCELLED"] = "CANCELLED";
111
- WorkflowRunStatus["QUEUED"] = "QUEUED";
112
- WorkflowRunStatus["BACKOFF"] = "BACKOFF";
113
- })(WorkflowRunStatus || (exports.WorkflowRunStatus = WorkflowRunStatus = {}));
114
53
  var WorkflowKind;
115
54
  (function (WorkflowKind) {
116
55
  WorkflowKind["FUNCTION"] = "FUNCTION";
117
56
  WorkflowKind["DURABLE"] = "DURABLE";
118
57
  WorkflowKind["DAG"] = "DAG";
119
58
  })(WorkflowKind || (exports.WorkflowKind = WorkflowKind = {}));
120
- var JobRunStatus;
121
- (function (JobRunStatus) {
122
- JobRunStatus["PENDING"] = "PENDING";
123
- JobRunStatus["RUNNING"] = "RUNNING";
124
- JobRunStatus["SUCCEEDED"] = "SUCCEEDED";
125
- JobRunStatus["FAILED"] = "FAILED";
126
- JobRunStatus["CANCELLED"] = "CANCELLED";
127
- JobRunStatus["BACKOFF"] = "BACKOFF";
128
- })(JobRunStatus || (exports.JobRunStatus = JobRunStatus = {}));
129
- var StepRunStatus;
130
- (function (StepRunStatus) {
131
- StepRunStatus["PENDING"] = "PENDING";
132
- StepRunStatus["PENDING_ASSIGNMENT"] = "PENDING_ASSIGNMENT";
133
- StepRunStatus["ASSIGNED"] = "ASSIGNED";
134
- StepRunStatus["RUNNING"] = "RUNNING";
135
- StepRunStatus["SUCCEEDED"] = "SUCCEEDED";
136
- StepRunStatus["FAILED"] = "FAILED";
137
- StepRunStatus["CANCELLED"] = "CANCELLED";
138
- StepRunStatus["CANCELLING"] = "CANCELLING";
139
- StepRunStatus["BACKOFF"] = "BACKOFF";
140
- })(StepRunStatus || (exports.StepRunStatus = StepRunStatus = {}));
59
+ var StepRunEventSeverity;
60
+ (function (StepRunEventSeverity) {
61
+ StepRunEventSeverity["INFO"] = "INFO";
62
+ StepRunEventSeverity["WARNING"] = "WARNING";
63
+ StepRunEventSeverity["CRITICAL"] = "CRITICAL";
64
+ })(StepRunEventSeverity || (exports.StepRunEventSeverity = StepRunEventSeverity = {}));
141
65
  var StepRunEventReason;
142
66
  (function (StepRunEventReason) {
143
67
  StepRunEventReason["REQUEUED_NO_WORKER"] = "REQUEUED_NO_WORKER";
@@ -158,23 +82,15 @@ var StepRunEventReason;
158
82
  StepRunEventReason["WORKFLOW_RUN_GROUP_KEY_SUCCEEDED"] = "WORKFLOW_RUN_GROUP_KEY_SUCCEEDED";
159
83
  StepRunEventReason["WORKFLOW_RUN_GROUP_KEY_FAILED"] = "WORKFLOW_RUN_GROUP_KEY_FAILED";
160
84
  })(StepRunEventReason || (exports.StepRunEventReason = StepRunEventReason = {}));
161
- var StepRunEventSeverity;
162
- (function (StepRunEventSeverity) {
163
- StepRunEventSeverity["INFO"] = "INFO";
164
- StepRunEventSeverity["WARNING"] = "WARNING";
165
- StepRunEventSeverity["CRITICAL"] = "CRITICAL";
166
- })(StepRunEventSeverity || (exports.StepRunEventSeverity = StepRunEventSeverity = {}));
167
- var WorkerRuntimeSDKs;
168
- (function (WorkerRuntimeSDKs) {
169
- WorkerRuntimeSDKs["GOLANG"] = "GOLANG";
170
- WorkerRuntimeSDKs["PYTHON"] = "PYTHON";
171
- WorkerRuntimeSDKs["TYPESCRIPT"] = "TYPESCRIPT";
172
- })(WorkerRuntimeSDKs || (exports.WorkerRuntimeSDKs = WorkerRuntimeSDKs = {}));
173
- var PullRequestState;
174
- (function (PullRequestState) {
175
- PullRequestState["Open"] = "open";
176
- PullRequestState["Closed"] = "closed";
177
- })(PullRequestState || (exports.PullRequestState = PullRequestState = {}));
85
+ var LogLineOrderByDirection;
86
+ (function (LogLineOrderByDirection) {
87
+ LogLineOrderByDirection["Asc"] = "asc";
88
+ LogLineOrderByDirection["Desc"] = "desc";
89
+ })(LogLineOrderByDirection || (exports.LogLineOrderByDirection = LogLineOrderByDirection = {}));
90
+ var LogLineOrderByField;
91
+ (function (LogLineOrderByField) {
92
+ LogLineOrderByField["CreatedAt"] = "createdAt";
93
+ })(LogLineOrderByField || (exports.LogLineOrderByField = LogLineOrderByField = {}));
178
94
  var LogLineLevel;
179
95
  (function (LogLineLevel) {
180
96
  LogLineLevel["DEBUG"] = "DEBUG";
@@ -182,21 +98,196 @@ var LogLineLevel;
182
98
  LogLineLevel["WARN"] = "WARN";
183
99
  LogLineLevel["ERROR"] = "ERROR";
184
100
  })(LogLineLevel || (exports.LogLineLevel = LogLineLevel = {}));
185
- var LogLineOrderByField;
186
- (function (LogLineOrderByField) {
187
- LogLineOrderByField["CreatedAt"] = "createdAt";
188
- })(LogLineOrderByField || (exports.LogLineOrderByField = LogLineOrderByField = {}));
189
- var LogLineOrderByDirection;
190
- (function (LogLineOrderByDirection) {
191
- LogLineOrderByDirection["Asc"] = "asc";
192
- LogLineOrderByDirection["Desc"] = "desc";
193
- })(LogLineOrderByDirection || (exports.LogLineOrderByDirection = LogLineOrderByDirection = {}));
194
- var WebhookWorkerRequestMethod;
195
- (function (WebhookWorkerRequestMethod) {
196
- WebhookWorkerRequestMethod["GET"] = "GET";
197
- WebhookWorkerRequestMethod["POST"] = "POST";
198
- WebhookWorkerRequestMethod["PUT"] = "PUT";
199
- })(WebhookWorkerRequestMethod || (exports.WebhookWorkerRequestMethod = WebhookWorkerRequestMethod = {}));
101
+ var JobRunStatus;
102
+ (function (JobRunStatus) {
103
+ JobRunStatus["PENDING"] = "PENDING";
104
+ JobRunStatus["RUNNING"] = "RUNNING";
105
+ JobRunStatus["SUCCEEDED"] = "SUCCEEDED";
106
+ JobRunStatus["FAILED"] = "FAILED";
107
+ JobRunStatus["CANCELLED"] = "CANCELLED";
108
+ JobRunStatus["BACKOFF"] = "BACKOFF";
109
+ })(JobRunStatus || (exports.JobRunStatus = JobRunStatus = {}));
110
+ var StepRunStatus;
111
+ (function (StepRunStatus) {
112
+ StepRunStatus["PENDING"] = "PENDING";
113
+ StepRunStatus["PENDING_ASSIGNMENT"] = "PENDING_ASSIGNMENT";
114
+ StepRunStatus["ASSIGNED"] = "ASSIGNED";
115
+ StepRunStatus["RUNNING"] = "RUNNING";
116
+ StepRunStatus["SUCCEEDED"] = "SUCCEEDED";
117
+ StepRunStatus["FAILED"] = "FAILED";
118
+ StepRunStatus["CANCELLED"] = "CANCELLED";
119
+ StepRunStatus["CANCELLING"] = "CANCELLING";
120
+ StepRunStatus["BACKOFF"] = "BACKOFF";
121
+ })(StepRunStatus || (exports.StepRunStatus = StepRunStatus = {}));
122
+ var ConcurrencyLimitStrategy;
123
+ (function (ConcurrencyLimitStrategy) {
124
+ ConcurrencyLimitStrategy["CANCEL_IN_PROGRESS"] = "CANCEL_IN_PROGRESS";
125
+ ConcurrencyLimitStrategy["DROP_NEWEST"] = "DROP_NEWEST";
126
+ ConcurrencyLimitStrategy["QUEUE_NEWEST"] = "QUEUE_NEWEST";
127
+ ConcurrencyLimitStrategy["GROUP_ROUND_ROBIN"] = "GROUP_ROUND_ROBIN";
128
+ })(ConcurrencyLimitStrategy || (exports.ConcurrencyLimitStrategy = ConcurrencyLimitStrategy = {}));
129
+ var CronWorkflowsOrderByField;
130
+ (function (CronWorkflowsOrderByField) {
131
+ CronWorkflowsOrderByField["Name"] = "name";
132
+ CronWorkflowsOrderByField["CreatedAt"] = "createdAt";
133
+ })(CronWorkflowsOrderByField || (exports.CronWorkflowsOrderByField = CronWorkflowsOrderByField = {}));
134
+ var CronWorkflowsMethod;
135
+ (function (CronWorkflowsMethod) {
136
+ CronWorkflowsMethod["DEFAULT"] = "DEFAULT";
137
+ CronWorkflowsMethod["API"] = "API";
138
+ })(CronWorkflowsMethod || (exports.CronWorkflowsMethod = CronWorkflowsMethod = {}));
139
+ var ScheduledRunStatus;
140
+ (function (ScheduledRunStatus) {
141
+ ScheduledRunStatus["PENDING"] = "PENDING";
142
+ ScheduledRunStatus["RUNNING"] = "RUNNING";
143
+ ScheduledRunStatus["SUCCEEDED"] = "SUCCEEDED";
144
+ ScheduledRunStatus["FAILED"] = "FAILED";
145
+ ScheduledRunStatus["CANCELLED"] = "CANCELLED";
146
+ ScheduledRunStatus["QUEUED"] = "QUEUED";
147
+ ScheduledRunStatus["SCHEDULED"] = "SCHEDULED";
148
+ })(ScheduledRunStatus || (exports.ScheduledRunStatus = ScheduledRunStatus = {}));
149
+ var WorkflowRunOrderByDirection;
150
+ (function (WorkflowRunOrderByDirection) {
151
+ WorkflowRunOrderByDirection["ASC"] = "ASC";
152
+ WorkflowRunOrderByDirection["DESC"] = "DESC";
153
+ })(WorkflowRunOrderByDirection || (exports.WorkflowRunOrderByDirection = WorkflowRunOrderByDirection = {}));
154
+ var ScheduledWorkflowsOrderByField;
155
+ (function (ScheduledWorkflowsOrderByField) {
156
+ ScheduledWorkflowsOrderByField["TriggerAt"] = "triggerAt";
157
+ ScheduledWorkflowsOrderByField["CreatedAt"] = "createdAt";
158
+ })(ScheduledWorkflowsOrderByField || (exports.ScheduledWorkflowsOrderByField = ScheduledWorkflowsOrderByField = {}));
159
+ var ScheduledWorkflowsMethod;
160
+ (function (ScheduledWorkflowsMethod) {
161
+ ScheduledWorkflowsMethod["DEFAULT"] = "DEFAULT";
162
+ ScheduledWorkflowsMethod["API"] = "API";
163
+ })(ScheduledWorkflowsMethod || (exports.ScheduledWorkflowsMethod = ScheduledWorkflowsMethod = {}));
164
+ var RateLimitOrderByDirection;
165
+ (function (RateLimitOrderByDirection) {
166
+ RateLimitOrderByDirection["Asc"] = "asc";
167
+ RateLimitOrderByDirection["Desc"] = "desc";
168
+ })(RateLimitOrderByDirection || (exports.RateLimitOrderByDirection = RateLimitOrderByDirection = {}));
169
+ var RateLimitOrderByField;
170
+ (function (RateLimitOrderByField) {
171
+ RateLimitOrderByField["Key"] = "key";
172
+ RateLimitOrderByField["Value"] = "value";
173
+ RateLimitOrderByField["LimitValue"] = "limitValue";
174
+ })(RateLimitOrderByField || (exports.RateLimitOrderByField = RateLimitOrderByField = {}));
175
+ var EventOrderByDirection;
176
+ (function (EventOrderByDirection) {
177
+ EventOrderByDirection["Asc"] = "asc";
178
+ EventOrderByDirection["Desc"] = "desc";
179
+ })(EventOrderByDirection || (exports.EventOrderByDirection = EventOrderByDirection = {}));
180
+ var EventOrderByField;
181
+ (function (EventOrderByField) {
182
+ EventOrderByField["CreatedAt"] = "createdAt";
183
+ })(EventOrderByField || (exports.EventOrderByField = EventOrderByField = {}));
184
+ var WorkflowRunStatus;
185
+ (function (WorkflowRunStatus) {
186
+ WorkflowRunStatus["PENDING"] = "PENDING";
187
+ WorkflowRunStatus["RUNNING"] = "RUNNING";
188
+ WorkflowRunStatus["SUCCEEDED"] = "SUCCEEDED";
189
+ WorkflowRunStatus["FAILED"] = "FAILED";
190
+ WorkflowRunStatus["CANCELLED"] = "CANCELLED";
191
+ WorkflowRunStatus["QUEUED"] = "QUEUED";
192
+ WorkflowRunStatus["BACKOFF"] = "BACKOFF";
193
+ })(WorkflowRunStatus || (exports.WorkflowRunStatus = WorkflowRunStatus = {}));
194
+ var TenantMemberRole;
195
+ (function (TenantMemberRole) {
196
+ TenantMemberRole["OWNER"] = "OWNER";
197
+ TenantMemberRole["ADMIN"] = "ADMIN";
198
+ TenantMemberRole["MEMBER"] = "MEMBER";
199
+ })(TenantMemberRole || (exports.TenantMemberRole = TenantMemberRole = {}));
200
+ var TenantResource;
201
+ (function (TenantResource) {
202
+ TenantResource["WORKER"] = "WORKER";
203
+ TenantResource["WORKER_SLOT"] = "WORKER_SLOT";
204
+ TenantResource["EVENT"] = "EVENT";
205
+ TenantResource["WORKFLOW_RUN"] = "WORKFLOW_RUN";
206
+ TenantResource["TASK_RUN"] = "TASK_RUN";
207
+ TenantResource["CRON"] = "CRON";
208
+ TenantResource["SCHEDULE"] = "SCHEDULE";
209
+ TenantResource["INCOMING_WEBHOOK"] = "INCOMING_WEBHOOK";
210
+ })(TenantResource || (exports.TenantResource = TenantResource = {}));
211
+ /** The status of the CEL evaluation */
212
+ var V1CELDebugResponseStatus;
213
+ (function (V1CELDebugResponseStatus) {
214
+ V1CELDebugResponseStatus["SUCCESS"] = "SUCCESS";
215
+ V1CELDebugResponseStatus["ERROR"] = "ERROR";
216
+ })(V1CELDebugResponseStatus || (exports.V1CELDebugResponseStatus = V1CELDebugResponseStatus = {}));
217
+ var V1WebhookHMACEncoding;
218
+ (function (V1WebhookHMACEncoding) {
219
+ V1WebhookHMACEncoding["HEX"] = "HEX";
220
+ V1WebhookHMACEncoding["BASE64"] = "BASE64";
221
+ V1WebhookHMACEncoding["BASE64URL"] = "BASE64URL";
222
+ })(V1WebhookHMACEncoding || (exports.V1WebhookHMACEncoding = V1WebhookHMACEncoding = {}));
223
+ var V1WebhookHMACAlgorithm;
224
+ (function (V1WebhookHMACAlgorithm) {
225
+ V1WebhookHMACAlgorithm["SHA1"] = "SHA1";
226
+ V1WebhookHMACAlgorithm["SHA256"] = "SHA256";
227
+ V1WebhookHMACAlgorithm["SHA512"] = "SHA512";
228
+ V1WebhookHMACAlgorithm["MD5"] = "MD5";
229
+ })(V1WebhookHMACAlgorithm || (exports.V1WebhookHMACAlgorithm = V1WebhookHMACAlgorithm = {}));
230
+ var V1WebhookAuthType;
231
+ (function (V1WebhookAuthType) {
232
+ V1WebhookAuthType["BASIC"] = "BASIC";
233
+ V1WebhookAuthType["API_KEY"] = "API_KEY";
234
+ V1WebhookAuthType["HMAC"] = "HMAC";
235
+ })(V1WebhookAuthType || (exports.V1WebhookAuthType = V1WebhookAuthType = {}));
236
+ var V1WebhookSourceName;
237
+ (function (V1WebhookSourceName) {
238
+ V1WebhookSourceName["GENERIC"] = "GENERIC";
239
+ V1WebhookSourceName["GITHUB"] = "GITHUB";
240
+ V1WebhookSourceName["STRIPE"] = "STRIPE";
241
+ V1WebhookSourceName["SLACK"] = "SLACK";
242
+ V1WebhookSourceName["LINEAR"] = "LINEAR";
243
+ })(V1WebhookSourceName || (exports.V1WebhookSourceName = V1WebhookSourceName = {}));
244
+ var TenantEnvironment;
245
+ (function (TenantEnvironment) {
246
+ TenantEnvironment["Local"] = "local";
247
+ TenantEnvironment["Development"] = "development";
248
+ TenantEnvironment["Production"] = "production";
249
+ })(TenantEnvironment || (exports.TenantEnvironment = TenantEnvironment = {}));
250
+ var TenantVersion;
251
+ (function (TenantVersion) {
252
+ TenantVersion["V0"] = "V0";
253
+ TenantVersion["V1"] = "V1";
254
+ })(TenantVersion || (exports.TenantVersion = TenantVersion = {}));
255
+ var V1LogLineLevel;
256
+ (function (V1LogLineLevel) {
257
+ V1LogLineLevel["DEBUG"] = "DEBUG";
258
+ V1LogLineLevel["INFO"] = "INFO";
259
+ V1LogLineLevel["WARN"] = "WARN";
260
+ V1LogLineLevel["ERROR"] = "ERROR";
261
+ })(V1LogLineLevel || (exports.V1LogLineLevel = V1LogLineLevel = {}));
262
+ var V1TaskEventType;
263
+ (function (V1TaskEventType) {
264
+ V1TaskEventType["REQUEUED_NO_WORKER"] = "REQUEUED_NO_WORKER";
265
+ V1TaskEventType["REQUEUED_RATE_LIMIT"] = "REQUEUED_RATE_LIMIT";
266
+ V1TaskEventType["SCHEDULING_TIMED_OUT"] = "SCHEDULING_TIMED_OUT";
267
+ V1TaskEventType["ASSIGNED"] = "ASSIGNED";
268
+ V1TaskEventType["STARTED"] = "STARTED";
269
+ V1TaskEventType["FINISHED"] = "FINISHED";
270
+ V1TaskEventType["FAILED"] = "FAILED";
271
+ V1TaskEventType["RETRYING"] = "RETRYING";
272
+ V1TaskEventType["CANCELLED"] = "CANCELLED";
273
+ V1TaskEventType["TIMED_OUT"] = "TIMED_OUT";
274
+ V1TaskEventType["REASSIGNED"] = "REASSIGNED";
275
+ V1TaskEventType["SLOT_RELEASED"] = "SLOT_RELEASED";
276
+ V1TaskEventType["TIMEOUT_REFRESHED"] = "TIMEOUT_REFRESHED";
277
+ V1TaskEventType["RETRIED_BY_USER"] = "RETRIED_BY_USER";
278
+ V1TaskEventType["SENT_TO_WORKER"] = "SENT_TO_WORKER";
279
+ V1TaskEventType["RATE_LIMIT_ERROR"] = "RATE_LIMIT_ERROR";
280
+ V1TaskEventType["ACKNOWLEDGED"] = "ACKNOWLEDGED";
281
+ V1TaskEventType["CREATED"] = "CREATED";
282
+ V1TaskEventType["QUEUED"] = "QUEUED";
283
+ V1TaskEventType["SKIPPED"] = "SKIPPED";
284
+ V1TaskEventType["COULD_NOT_SEND_TO_WORKER"] = "COULD_NOT_SEND_TO_WORKER";
285
+ })(V1TaskEventType || (exports.V1TaskEventType = V1TaskEventType = {}));
286
+ var V1WorkflowType;
287
+ (function (V1WorkflowType) {
288
+ V1WorkflowType["DAG"] = "DAG";
289
+ V1WorkflowType["TASK"] = "TASK";
290
+ })(V1WorkflowType || (exports.V1WorkflowType = V1WorkflowType = {}));
200
291
  var V1TaskStatus;
201
292
  (function (V1TaskStatus) {
202
293
  V1TaskStatus["QUEUED"] = "QUEUED";
@@ -205,24 +296,3 @@ var V1TaskStatus;
205
296
  V1TaskStatus["CANCELLED"] = "CANCELLED";
206
297
  V1TaskStatus["FAILED"] = "FAILED";
207
298
  })(V1TaskStatus || (exports.V1TaskStatus = V1TaskStatus = {}));
208
- var V1TaskRunStatus;
209
- (function (V1TaskRunStatus) {
210
- V1TaskRunStatus["PENDING"] = "PENDING";
211
- V1TaskRunStatus["RUNNING"] = "RUNNING";
212
- V1TaskRunStatus["COMPLETED"] = "COMPLETED";
213
- V1TaskRunStatus["FAILED"] = "FAILED";
214
- V1TaskRunStatus["CANCELLED"] = "CANCELLED";
215
- })(V1TaskRunStatus || (exports.V1TaskRunStatus = V1TaskRunStatus = {}));
216
- var V1LogLineLevel;
217
- (function (V1LogLineLevel) {
218
- V1LogLineLevel["DEBUG"] = "DEBUG";
219
- V1LogLineLevel["INFO"] = "INFO";
220
- V1LogLineLevel["WARN"] = "WARN";
221
- V1LogLineLevel["ERROR"] = "ERROR";
222
- })(V1LogLineLevel || (exports.V1LogLineLevel = V1LogLineLevel = {}));
223
- /** The status of the CEL evaluation */
224
- var V1CELDebugResponseStatus;
225
- (function (V1CELDebugResponseStatus) {
226
- V1CELDebugResponseStatus["SUCCESS"] = "SUCCESS";
227
- V1CELDebugResponseStatus["ERROR"] = "ERROR";
228
- })(V1CELDebugResponseStatus || (exports.V1CELDebugResponseStatus = V1CELDebugResponseStatus = {}));
@@ -22,6 +22,7 @@ export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequest
22
22
  }
23
23
  export declare enum ContentType {
24
24
  Json = "application/json",
25
+ JsonApi = "application/vnd.api+json",
25
26
  FormData = "multipart/form-data",
26
27
  UrlEncoded = "application/x-www-form-urlencoded",
27
28
  Text = "text/plain"
@@ -39,6 +39,7 @@ const axios_1 = __importDefault(require("axios"));
39
39
  var ContentType;
40
40
  (function (ContentType) {
41
41
  ContentType["Json"] = "application/json";
42
+ ContentType["JsonApi"] = "application/vnd.api+json";
42
43
  ContentType["FormData"] = "multipart/form-data";
43
44
  ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
44
45
  ContentType["Text"] = "text/plain";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hatchet-dev/typescript-sdk",
3
- "version": "1.10.4",
3
+ "version": "1.10.6",
4
4
  "description": "Background task orchestration & visibility for developers",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -62,7 +62,7 @@
62
62
  "nice-grpc": "^2.1.12",
63
63
  "nice-grpc-common": "^2.0.2",
64
64
  "protobufjs": "^7.4.0",
65
- "qs": "^6.14.0",
65
+ "qs": "^6.14.1",
66
66
  "semver": "^7.7.1",
67
67
  "yaml": "^2.7.1",
68
68
  "zod": "^3.24.2"
@@ -79,7 +79,7 @@
79
79
  "test:e2e": "jest --testMatch='**/*.e2e.ts'",
80
80
  "test:unit:watch": "jest --testMatch='**/*.test.ts' --watch",
81
81
  "generate": "pnpm run '/generate-.*/'",
82
- "generate-api": "npx --yes swagger-cli bundle ../../api-contracts/openapi/openapi.yaml --outfile openapi.yaml --type yaml && npx swagger-typescript-api@13.1.0 generate -p openapi.yaml -o src/clients/rest/generated -n hatchet.ts --modular --axios",
82
+ "generate-api": "npx swagger-typescript-api@13.2.7 generate -p ../../bin/oas/openapi.yaml -o ./src/clients/rest/generated -n hatchet.ts --modular --axios",
83
83
  "generate-protoc": "./generate-protoc.sh",
84
84
  "lint:check": "pnpm run eslint:check && pnpm run prettier:check",
85
85
  "lint:fix": "pnpm run eslint:fix && pnpm run prettier:fix",
@@ -410,8 +410,11 @@ class V1Worker {
410
410
  return step(context);
411
411
  });
412
412
  const success = (result) => __awaiter(this, void 0, void 0, function* () {
413
- this.logger.info(`Step run ${action.stepRunId} succeeded`);
414
413
  try {
414
+ if (context.cancelled) {
415
+ return;
416
+ }
417
+ this.logger.info(`Step run ${action.stepRunId} succeeded`);
415
418
  // Send the action event to the dispatcher
416
419
  const event = this.getStepActionEvent(action, dispatcher_1.StepActionEventType.STEP_EVENT_TYPE_COMPLETED, false, result || null, action.retryCount);
417
420
  yield this.client._v0.dispatcher.sendStepActionEvent(event);
@@ -435,12 +438,15 @@ class V1Worker {
435
438
  }
436
439
  });
437
440
  const failure = (error) => __awaiter(this, void 0, void 0, function* () {
438
- this.logger.error(`Step run ${action.stepRunId} failed: ${error.message}`);
439
- if (error.stack) {
440
- this.logger.error(error.stack);
441
- }
442
441
  const shouldNotRetry = error instanceof task_1.NonRetryableError;
443
442
  try {
443
+ if (context.cancelled) {
444
+ return;
445
+ }
446
+ this.logger.error(`Step run ${action.stepRunId} failed: ${error.message}`);
447
+ if (error.stack) {
448
+ this.logger.error(error.stack);
449
+ }
444
450
  // Send the action event to the dispatcher
445
451
  const event = this.getStepActionEvent(action, dispatcher_1.StepActionEventType.STEP_EVENT_TYPE_FAILED, shouldNotRetry, {
446
452
  message: error === null || error === void 0 ? void 0 : error.message,
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const HATCHET_VERSION = "1.10.4";
1
+ export declare const HATCHET_VERSION = "1.10.6";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HATCHET_VERSION = void 0;
4
- exports.HATCHET_VERSION = '1.10.4';
4
+ exports.HATCHET_VERSION = '1.10.6';