@hatchet-dev/typescript-sdk 1.26.2 → 1.28.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/dispatcher/dispatcher-client.d.ts +6 -1
- package/clients/dispatcher/dispatcher-client.js +14 -0
- package/clients/rest/generated/Api.d.ts +2 -0
- package/clients/rest/generated/data-contracts.d.ts +2 -0
- package/clients/rest/generated/data-contracts.js +2 -0
- package/package.json +1 -1
- package/protoc/dispatcher/dispatcher.d.ts +67 -0
- package/protoc/dispatcher/dispatcher.js +495 -3
- package/protoc/events/events.js +1 -1
- package/protoc/google/protobuf/any.js +1 -1
- package/protoc/google/protobuf/timestamp.js +1 -1
- package/protoc/google/rpc/status.js +1 -1
- package/protoc/v1/dispatcher.js +1 -1
- package/protoc/v1/shared/condition.js +1 -1
- package/protoc/v1/shared/trigger.js +1 -1
- package/protoc/v1/workflows.d.ts +27 -1
- package/protoc/v1/workflows.js +235 -9
- package/protoc/workflows/workflows.js +1 -1
- package/util/workflow-run-ref.js +23 -9
- package/v1/client/client.d.ts +26 -1
- package/v1/client/client.js +6 -0
- package/v1/client/worker/context.js +23 -3
- package/v1/client/worker/worker-internal.d.ts +22 -1
- package/v1/client/worker/worker-internal.js +174 -3
- package/v1/declaration.d.ts +62 -2
- package/v1/declaration.js +56 -0
- package/v1/examples/batch_assign/workflow.d.ts +62 -0
- package/v1/examples/batch_assign/workflow.js +161 -0
- package/v1/examples/e2e-worker.js +35 -21
- package/v1/examples/idempotency/workflow.d.ts +3 -0
- package/v1/examples/idempotency/workflow.js +14 -1
- package/v1/task.d.ts +63 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.batchChildBatchSpawn = exports.batchChildSpawn = exports.childBatch = exports.child = exports.batchCancel = exports.batchBroadcast = exports.batchOrdered = exports.batchSingle = exports.batchLarge = exports.batchKeyedInterval = exports.batchKeyedFailable = exports.batchKeyed = exports.batchSimple = void 0;
|
|
13
|
+
const hatchet_client_1 = require("../hatchet-client");
|
|
14
|
+
exports.batchSimple = hatchet_client_1.hatchet.batchTask({
|
|
15
|
+
name: 'batch-simple',
|
|
16
|
+
batch: { maxSize: 3, maxInterval: 200 },
|
|
17
|
+
fn: (tasks) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
const out = {};
|
|
19
|
+
Object.entries(tasks).forEach(([id, input]) => {
|
|
20
|
+
out[id] = { transformed_message: input.message.toUpperCase() };
|
|
21
|
+
});
|
|
22
|
+
return out;
|
|
23
|
+
}),
|
|
24
|
+
});
|
|
25
|
+
exports.batchKeyed = hatchet_client_1.hatchet.batchTask({
|
|
26
|
+
name: 'batch-keyed',
|
|
27
|
+
batch: { maxSize: 2, maxInterval: 200, groupKey: 'input.group' },
|
|
28
|
+
fn: (tasks) => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
|
+
const uniqueKeys = new Set(Object.values(tasks).map((i) => i.group)).size;
|
|
30
|
+
const batchSize = Object.keys(tasks).length;
|
|
31
|
+
const out = {};
|
|
32
|
+
Object.entries(tasks).forEach(([id, input]) => {
|
|
33
|
+
out[id] = {
|
|
34
|
+
batch_key: input.group,
|
|
35
|
+
batch_size: batchSize,
|
|
36
|
+
unique_keys: uniqueKeys,
|
|
37
|
+
uppercase: input.message.toUpperCase(),
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
return out;
|
|
41
|
+
}),
|
|
42
|
+
});
|
|
43
|
+
exports.batchKeyedFailable = hatchet_client_1.hatchet.batchTask({
|
|
44
|
+
name: 'batch-keyed-failable',
|
|
45
|
+
batch: { maxSize: 2, maxInterval: 200, groupKey: 'input.group' },
|
|
46
|
+
fn: (tasks) => __awaiter(void 0, void 0, void 0, function* () {
|
|
47
|
+
const out = {};
|
|
48
|
+
Object.entries(tasks).forEach(([id, input]) => {
|
|
49
|
+
out[id] = { uppercase: input.message.toUpperCase() };
|
|
50
|
+
});
|
|
51
|
+
return out;
|
|
52
|
+
}),
|
|
53
|
+
});
|
|
54
|
+
exports.batchKeyedInterval = hatchet_client_1.hatchet.batchTask({
|
|
55
|
+
name: 'batch-keyed-interval',
|
|
56
|
+
batch: { maxSize: 3, maxInterval: 150, groupKey: 'input.group' },
|
|
57
|
+
fn: (tasks) => __awaiter(void 0, void 0, void 0, function* () {
|
|
58
|
+
const uniqueKeys = new Set(Object.values(tasks).map((i) => i.group)).size;
|
|
59
|
+
const batchSize = Object.keys(tasks).length;
|
|
60
|
+
const out = {};
|
|
61
|
+
Object.entries(tasks).forEach(([id, input]) => {
|
|
62
|
+
out[id] = {
|
|
63
|
+
batch_key: input.group,
|
|
64
|
+
batch_size: batchSize,
|
|
65
|
+
unique_keys: uniqueKeys,
|
|
66
|
+
uppercase: input.message.toUpperCase(),
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
return out;
|
|
70
|
+
}),
|
|
71
|
+
});
|
|
72
|
+
exports.batchLarge = hatchet_client_1.hatchet.batchTask({
|
|
73
|
+
name: 'batch-large',
|
|
74
|
+
batch: { maxSize: 100, maxInterval: 10000 },
|
|
75
|
+
fn: (tasks) => __awaiter(void 0, void 0, void 0, function* () {
|
|
76
|
+
const batchId = crypto.randomUUID();
|
|
77
|
+
const batchSize = Object.keys(tasks).length;
|
|
78
|
+
const out = {};
|
|
79
|
+
Object.entries(tasks).forEach(([id, input]) => {
|
|
80
|
+
out[id] = {
|
|
81
|
+
batch_id: batchId,
|
|
82
|
+
received: true,
|
|
83
|
+
batch_size: batchSize,
|
|
84
|
+
data_length: input.data.length,
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
return out;
|
|
88
|
+
}),
|
|
89
|
+
});
|
|
90
|
+
exports.batchSingle = hatchet_client_1.hatchet.batchTask({
|
|
91
|
+
name: 'batch-single',
|
|
92
|
+
batch: { maxSize: 1, maxInterval: 100 },
|
|
93
|
+
fn: (tasks) => __awaiter(void 0, void 0, void 0, function* () {
|
|
94
|
+
const batchSize = Object.keys(tasks).length;
|
|
95
|
+
const out = {};
|
|
96
|
+
Object.entries(tasks).forEach(([id, input]) => {
|
|
97
|
+
out[id] = { original: input.message, batch_size: batchSize };
|
|
98
|
+
});
|
|
99
|
+
return out;
|
|
100
|
+
}),
|
|
101
|
+
});
|
|
102
|
+
exports.batchOrdered = hatchet_client_1.hatchet.batchTask({
|
|
103
|
+
name: 'batch-ordered',
|
|
104
|
+
batch: { maxSize: 20, maxInterval: 2000 },
|
|
105
|
+
fn: (tasks) => __awaiter(void 0, void 0, void 0, function* () {
|
|
106
|
+
const out = {};
|
|
107
|
+
Object.entries(tasks).forEach(([id, input]) => {
|
|
108
|
+
out[id] = { index: input.index };
|
|
109
|
+
});
|
|
110
|
+
return out;
|
|
111
|
+
}),
|
|
112
|
+
});
|
|
113
|
+
exports.batchBroadcast = hatchet_client_1.hatchet.batchTask({
|
|
114
|
+
name: 'batch-broadcast',
|
|
115
|
+
batch: { maxSize: 10, maxInterval: 2000, broadcastOutput: true },
|
|
116
|
+
fn: (tasks) => __awaiter(void 0, void 0, void 0, function* () {
|
|
117
|
+
const sum = Object.values(tasks).reduce((acc, i) => acc + i.message.length, 0);
|
|
118
|
+
return { sum };
|
|
119
|
+
}),
|
|
120
|
+
});
|
|
121
|
+
exports.batchCancel = hatchet_client_1.hatchet.batchTask({
|
|
122
|
+
name: 'batch-cancel',
|
|
123
|
+
batch: { maxSize: 10, maxInterval: 2000, broadcastOutput: true },
|
|
124
|
+
fn: (_tasks, ctx) => __awaiter(void 0, void 0, void 0, function* () {
|
|
125
|
+
yield ctx.cancel();
|
|
126
|
+
return {};
|
|
127
|
+
}),
|
|
128
|
+
});
|
|
129
|
+
exports.child = hatchet_client_1.hatchet.task({
|
|
130
|
+
name: 'batch-child',
|
|
131
|
+
fn: (input) => __awaiter(void 0, void 0, void 0, function* () { return ({ message_len: input.message.length }); }),
|
|
132
|
+
});
|
|
133
|
+
exports.childBatch = hatchet_client_1.hatchet.batchTask({
|
|
134
|
+
name: 'batch-child-batch',
|
|
135
|
+
batch: { maxSize: 10, maxInterval: 60000, broadcastOutput: true },
|
|
136
|
+
fn: (tasks) => __awaiter(void 0, void 0, void 0, function* () { return ({ out: tasks }); }),
|
|
137
|
+
});
|
|
138
|
+
exports.batchChildSpawn = hatchet_client_1.hatchet.batchTask({
|
|
139
|
+
name: 'batch-child-spawn',
|
|
140
|
+
batch: { maxSize: 10, maxInterval: 60000 },
|
|
141
|
+
executionTimeout: '60s',
|
|
142
|
+
fn: (tasks) => __awaiter(void 0, void 0, void 0, function* () {
|
|
143
|
+
const out = {};
|
|
144
|
+
yield Promise.all(Object.keys(tasks).map((id) => __awaiter(void 0, void 0, void 0, function* () {
|
|
145
|
+
out[id] = yield exports.child.run({ message: 'blahblah' });
|
|
146
|
+
})));
|
|
147
|
+
return out;
|
|
148
|
+
}),
|
|
149
|
+
});
|
|
150
|
+
exports.batchChildBatchSpawn = hatchet_client_1.hatchet.batchTask({
|
|
151
|
+
name: 'batch-child-batch-spawn',
|
|
152
|
+
batch: { maxSize: 10, maxInterval: 60000 },
|
|
153
|
+
executionTimeout: '60s',
|
|
154
|
+
fn: (tasks) => __awaiter(void 0, void 0, void 0, function* () {
|
|
155
|
+
const out = {};
|
|
156
|
+
yield Promise.all(Object.keys(tasks).map((id) => __awaiter(void 0, void 0, void 0, function* () {
|
|
157
|
+
out[id] = yield exports.childBatch.run({ message: 'hello' });
|
|
158
|
+
})));
|
|
159
|
+
return out;
|
|
160
|
+
}),
|
|
161
|
+
});
|
|
@@ -37,13 +37,14 @@ const workflow_16 = require("./on_event/workflow");
|
|
|
37
37
|
const workflow_17 = require("./return_exceptions/workflow");
|
|
38
38
|
const workflow_18 = require("./run_details/workflow");
|
|
39
39
|
const e2e_workflows_1 = require("./simple/e2e-workflows");
|
|
40
|
-
const workflow_19 = require("./
|
|
41
|
-
const workflow_20 = require("./
|
|
42
|
-
const workflow_21 = require("./
|
|
43
|
-
const workflow_22 = require("./
|
|
44
|
-
const workflow_23 = require("./
|
|
45
|
-
const workflow_24 = require("./
|
|
46
|
-
const workflow_25 = require("./
|
|
40
|
+
const workflow_19 = require("./batch_assign/workflow");
|
|
41
|
+
const workflow_20 = require("./streaming/workflow");
|
|
42
|
+
const workflow_21 = require("./timeout/workflow");
|
|
43
|
+
const workflow_22 = require("./webhooks/workflow");
|
|
44
|
+
const workflow_23 = require("./child_index/workflow");
|
|
45
|
+
const workflow_24 = require("./support_agent/workflow");
|
|
46
|
+
const workflow_25 = require("./welcome_email/workflow");
|
|
47
|
+
const workflow_26 = require("./pdf_pipeline/workflow");
|
|
47
48
|
const workflows = [
|
|
48
49
|
workflow_1.bulkChild,
|
|
49
50
|
workflow_1.bulkParentWorkflow,
|
|
@@ -94,20 +95,33 @@ const workflows = [
|
|
|
94
95
|
workflow_18.runDetailTestWorkflow,
|
|
95
96
|
e2e_workflows_1.helloWorld,
|
|
96
97
|
e2e_workflows_1.helloWorldDurable,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
98
|
+
workflow_20.streamingTask,
|
|
99
|
+
workflow_21.timeoutTask,
|
|
100
|
+
workflow_21.refreshTimeoutTask,
|
|
101
|
+
workflow_22.webhookWorkflow,
|
|
102
|
+
workflow_23.childIndexChild,
|
|
103
|
+
workflow_23.childIndexParent,
|
|
104
|
+
workflow_23.scenarioTask,
|
|
105
|
+
workflow_23.orchestratorTask,
|
|
106
|
+
workflow_24.supportAgent,
|
|
107
|
+
workflow_24.triageTicket,
|
|
108
|
+
workflow_24.generateReply,
|
|
109
|
+
workflow_24.escalateTicket,
|
|
110
|
+
workflow_25.welcomeEmail,
|
|
111
|
+
workflow_26.pdfPipeline,
|
|
112
|
+
workflow_19.batchSimple,
|
|
113
|
+
workflow_19.batchKeyed,
|
|
114
|
+
workflow_19.batchKeyedFailable,
|
|
115
|
+
workflow_19.batchKeyedInterval,
|
|
116
|
+
workflow_19.batchLarge,
|
|
117
|
+
workflow_19.batchSingle,
|
|
118
|
+
workflow_19.batchOrdered,
|
|
119
|
+
workflow_19.batchBroadcast,
|
|
120
|
+
workflow_19.batchCancel,
|
|
121
|
+
workflow_19.child,
|
|
122
|
+
workflow_19.childBatch,
|
|
123
|
+
workflow_19.batchChildSpawn,
|
|
124
|
+
workflow_19.batchChildBatchSpawn,
|
|
111
125
|
];
|
|
112
126
|
function main() {
|
|
113
127
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -8,3 +8,6 @@ export declare const idempotentTask: import("../..").TaskWorkflowDeclaration<Ide
|
|
|
8
8
|
export declare const idempotentTaskShortWindow: import("../..").TaskWorkflowDeclaration<IdempotencyInput, {
|
|
9
9
|
result: string;
|
|
10
10
|
}, {}, {}, {}, {}>;
|
|
11
|
+
export declare const idempotentStatusBasedTask: import("../..").TaskWorkflowDeclaration<IdempotencyInput, {
|
|
12
|
+
result: string;
|
|
13
|
+
}, {}, {}, {}, {}>;
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.idempotentTaskShortWindow = exports.idempotentTask = exports.EVENT_KEY = void 0;
|
|
12
|
+
exports.idempotentStatusBasedTask = exports.idempotentTaskShortWindow = exports.idempotentTask = exports.EVENT_KEY = void 0;
|
|
13
13
|
const hatchet_client_1 = require("../hatchet-client");
|
|
14
14
|
exports.EVENT_KEY = 'ts-e2e:idempotency-example';
|
|
15
15
|
// > idempotency
|
|
@@ -37,3 +37,16 @@ exports.idempotentTaskShortWindow = hatchet_client_1.hatchet.task({
|
|
|
37
37
|
return { result: `Hello, world from task ${input.id}` };
|
|
38
38
|
}),
|
|
39
39
|
});
|
|
40
|
+
// > status-based-idempotency
|
|
41
|
+
exports.idempotentStatusBasedTask = hatchet_client_1.hatchet.task({
|
|
42
|
+
name: 'ts-e2e-idempotent-status-based-task',
|
|
43
|
+
idempotency: {
|
|
44
|
+
strategy: 'status',
|
|
45
|
+
expression: 'input.id',
|
|
46
|
+
fallbackTtlMs: 10000,
|
|
47
|
+
},
|
|
48
|
+
fn: (input) => __awaiter(void 0, void 0, void 0, function* () {
|
|
49
|
+
return { result: `Hello, world from task ${input.id}` };
|
|
50
|
+
}),
|
|
51
|
+
});
|
|
52
|
+
// !!
|
package/v1/task.d.ts
CHANGED
|
@@ -56,15 +56,69 @@ export type TTLBasedIdempotencyConfig = BaseIdempotencyConfig & {
|
|
|
56
56
|
*/
|
|
57
57
|
ttlMs: number;
|
|
58
58
|
};
|
|
59
|
+
/**
|
|
60
|
+
* Status-based idempotency: keeps the idempotency key alive until the associated run
|
|
61
|
+
* reaches a terminal status. `fallbackTtlMs` caps how long the key can live before it's evicted.
|
|
62
|
+
*/
|
|
63
|
+
export type StatusBasedIdempotencyConfig = BaseIdempotencyConfig & {
|
|
64
|
+
strategy: 'status';
|
|
65
|
+
/**
|
|
66
|
+
* Fallback time-to-live (in milliseconds): the longest the idempotency key can live
|
|
67
|
+
* before it's evicted, even if the run has not reached a terminal status.
|
|
68
|
+
*/
|
|
69
|
+
fallbackTtlMs: number;
|
|
70
|
+
};
|
|
59
71
|
/**
|
|
60
72
|
* Union of all supported idempotency configurations.
|
|
61
73
|
*/
|
|
62
|
-
export type IdempotencyConfig = TTLBasedIdempotencyConfig;
|
|
74
|
+
export type IdempotencyConfig = TTLBasedIdempotencyConfig | StatusBasedIdempotencyConfig;
|
|
63
75
|
export declare class NonRetryableError extends Error {
|
|
64
76
|
constructor(message?: string);
|
|
65
77
|
}
|
|
66
78
|
export type TaskFn<I extends InputType = UnknownInputType, O extends OutputType = void, C = Context<I>> = (input: I, ctx: C) => O | Promise<O>;
|
|
67
79
|
export type DurableTaskFn<I extends InputType = UnknownInputType, O extends OutputType = void> = TaskFn<I, O, DurableContext<I>>;
|
|
80
|
+
/**
|
|
81
|
+
* Configures a task as a batch task: concurrent runs are buffered and dispatched together
|
|
82
|
+
* as a single execution once maxSize is reached, maxInterval elapses, or (if groupKey is
|
|
83
|
+
* set) once groupMaxRuns concurrent batches per group are exceeded.
|
|
84
|
+
*
|
|
85
|
+
* Preview: batch tasks are in beta and may change in future releases.
|
|
86
|
+
*/
|
|
87
|
+
export type BatchTaskConfig = {
|
|
88
|
+
/**
|
|
89
|
+
* Maximum number of items buffered before the batch is flushed. Must be positive.
|
|
90
|
+
*/
|
|
91
|
+
maxSize: number;
|
|
92
|
+
/**
|
|
93
|
+
* (optional) maximum time to wait before flushing a partially-filled batch.
|
|
94
|
+
* go duration format (e.g., "1s", "5m", "1h").
|
|
95
|
+
*/
|
|
96
|
+
maxInterval?: Duration;
|
|
97
|
+
/**
|
|
98
|
+
* (optional) CEL expression evaluated against each item's input to partition items into
|
|
99
|
+
* independent batches, e.g. "input.group". When unset, all items buffered for the task
|
|
100
|
+
* share a single batch.
|
|
101
|
+
*/
|
|
102
|
+
groupKey?: string;
|
|
103
|
+
/**
|
|
104
|
+
* (optional) maximum number of concurrent batches per group.
|
|
105
|
+
*/
|
|
106
|
+
groupMaxRuns?: number;
|
|
107
|
+
/**
|
|
108
|
+
* (optional) when true, the handler returns a single value that is broadcast as the
|
|
109
|
+
* result to every member of the batch, instead of a Record keyed by batch member id.
|
|
110
|
+
*
|
|
111
|
+
* default: false
|
|
112
|
+
*/
|
|
113
|
+
broadcastOutput?: boolean;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* The function signature for a batch task's handler. `input` maps each buffered run's
|
|
117
|
+
* task-run external id (its "batch member id") to that run's input. Unless
|
|
118
|
+
* `batch.broadcastOutput` is set, the handler must return a Record with the exact same
|
|
119
|
+
* key set, mapping each id to that run's output.
|
|
120
|
+
*/
|
|
121
|
+
export type BatchTaskFn<I extends InputType = UnknownInputType, O extends OutputType = void> = (input: Record<string, I>, ctx: Context<Record<string, I>>) => O | Promise<O>;
|
|
68
122
|
/**
|
|
69
123
|
* Options for creating a hatchet task which is an atomic unit of work in a workflow.
|
|
70
124
|
* @template I The input type for the task function.
|
|
@@ -156,6 +210,13 @@ export type CreateBaseTaskOpts<I extends InputType = UnknownInputType, O extends
|
|
|
156
210
|
slotCost?: number;
|
|
157
211
|
/** @internal */
|
|
158
212
|
slotRequests?: Record<string, number>;
|
|
213
|
+
/**
|
|
214
|
+
* (optional) configures this task as a batch task. Not available on durable tasks.
|
|
215
|
+
* retries is always forced to 0 when batch is set.
|
|
216
|
+
*
|
|
217
|
+
* Preview: batch tasks are in beta and may change in future releases.
|
|
218
|
+
*/
|
|
219
|
+
batch?: BatchTaskConfig;
|
|
159
220
|
};
|
|
160
221
|
export type CreateWorkflowTaskOpts<I extends InputType = UnknownInputType, O extends OutputType = void, C extends TaskFn<I, O> | DurableTaskFn<I, O> = TaskFn<I, O>> = CreateBaseTaskOpts<I, O, C> & {
|
|
161
222
|
/**
|
|
@@ -221,7 +282,7 @@ export type CreateWorkflowTaskOpts<I extends InputType = UnknownInputType, O ext
|
|
|
221
282
|
* @template I The input type for the task function.
|
|
222
283
|
* @template O The return type of the task function (can be inferred from the return value of fn).
|
|
223
284
|
*/
|
|
224
|
-
export type CreateWorkflowDurableTaskOpts<I extends InputType = UnknownInputType, O extends OutputType = void, C extends DurableTaskFn<I, O> = DurableTaskFn<I, O>> = Omit<CreateWorkflowTaskOpts<I, O, C>, 'slotCost'> & {
|
|
285
|
+
export type CreateWorkflowDurableTaskOpts<I extends InputType = UnknownInputType, O extends OutputType = void, C extends DurableTaskFn<I, O> = DurableTaskFn<I, O>> = Omit<CreateWorkflowTaskOpts<I, O, C>, 'slotCost' | 'batch'> & {
|
|
225
286
|
/**
|
|
226
287
|
* Eviction policy for the durable task. Controls TTL-based eviction and capacity-based eviction.
|
|
227
288
|
* Defaults to the built-in eviction policy when omitted or `undefined`.
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const HATCHET_VERSION = "1.
|
|
1
|
+
export declare const HATCHET_VERSION = "1.28.0";
|
package/version.js
CHANGED