@hatchet-dev/typescript-sdk 1.11.0 → 1.12.1
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 +38 -0
- package/clients/admin/admin-client.js +19 -6
- package/clients/dispatcher/action-listener.d.ts +6 -2
- package/clients/dispatcher/action-listener.js +2 -2
- package/clients/dispatcher/dispatcher-client.d.ts +22 -3
- package/clients/dispatcher/dispatcher-client.js +41 -4
- package/clients/event/event-client.d.ts +2 -2
- package/clients/event/event-client.js +4 -4
- package/clients/hatchet-client/hatchet-logger.js +2 -2
- package/clients/rest/generated/Api.d.ts +9 -1
- package/clients/rest/generated/data-contracts.d.ts +44 -8
- package/clients/rest/generated/data-contracts.js +13 -2
- package/clients/worker/worker.js +11 -11
- package/examples/webhooks.d.ts +1 -0
- package/examples/webhooks.js +45 -0
- package/package.json +1 -1
- package/protoc/dispatcher/dispatcher.d.ts +70 -25
- package/protoc/dispatcher/dispatcher.js +323 -97
- package/protoc/events/events.d.ts +4 -4
- package/protoc/events/events.js +20 -16
- package/protoc/v1/workflows.d.ts +18 -7
- package/protoc/v1/workflows.js +122 -2
- package/protoc/workflows/workflows.d.ts +22 -22
- package/protoc/workflows/workflows.js +18 -18
- package/step.d.ts +6 -0
- package/step.js +27 -19
- package/util/workflow-run-ref.js +1 -1
- package/v1/client/admin.d.ts +30 -0
- package/v1/client/admin.js +21 -6
- package/v1/client/client.d.ts +8 -1
- package/v1/client/client.js +13 -2
- package/v1/client/features/runs.d.ts +9 -1
- package/v1/client/features/runs.js +4 -2
- package/v1/client/features/webhooks.d.ts +28 -0
- package/v1/client/features/webhooks.js +97 -0
- package/v1/client/worker/context.d.ts +6 -0
- package/v1/client/worker/context.js +30 -22
- package/v1/client/worker/deprecated/deprecation.d.ts +44 -0
- package/v1/client/worker/deprecated/deprecation.js +95 -0
- package/v1/client/worker/deprecated/index.d.ts +4 -0
- package/v1/client/worker/deprecated/index.js +15 -0
- package/v1/client/worker/deprecated/legacy-registration.d.ts +18 -0
- package/v1/client/worker/deprecated/legacy-registration.js +35 -0
- package/v1/client/worker/deprecated/legacy-v1-worker.d.ts +15 -0
- package/v1/client/worker/deprecated/legacy-v1-worker.js +39 -0
- package/v1/client/worker/deprecated/legacy-worker.d.ts +41 -0
- package/v1/client/worker/deprecated/legacy-worker.js +148 -0
- package/v1/client/worker/slot-utils.d.ts +21 -0
- package/v1/client/worker/slot-utils.js +73 -0
- package/v1/client/worker/worker-internal.d.ts +16 -5
- package/v1/client/worker/worker-internal.js +54 -37
- package/v1/client/worker/worker.d.ts +12 -15
- package/v1/client/worker/worker.js +45 -49
- package/v1/declaration.js +1 -1
- package/v1/index.d.ts +1 -0
- package/v1/index.js +1 -0
- package/v1/parent-run-context-vars.d.ts +4 -1
- package/v1/parent-run-context-vars.js +1 -0
- package/v1/slot-types.d.ts +5 -0
- package/v1/slot-types.js +9 -0
- package/v1/task.d.ts +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/workflow.d.ts +2 -2
|
@@ -14,6 +14,7 @@ class ParentRunContextManager {
|
|
|
14
14
|
const parentRunContext = this.getContext();
|
|
15
15
|
if (parentRunContext) {
|
|
16
16
|
parentRunContext.parentId = opts.parentId;
|
|
17
|
+
parentRunContext.parentTaskRunExternalId = opts.parentTaskRunExternalId;
|
|
17
18
|
parentRunContext.childIndex = ((_a = parentRunContext.childIndex) !== null && _a !== void 0 ? _a : 0) + 1;
|
|
18
19
|
this.setContext(parentRunContext);
|
|
19
20
|
}
|
package/v1/slot-types.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlotType = void 0;
|
|
4
|
+
// eslint-disable-next-line no-shadow
|
|
5
|
+
var SlotType;
|
|
6
|
+
(function (SlotType) {
|
|
7
|
+
SlotType["Default"] = "default";
|
|
8
|
+
SlotType["Durable"] = "durable";
|
|
9
|
+
})(SlotType || (exports.SlotType = SlotType = {}));
|
package/v1/task.d.ts
CHANGED
|
@@ -103,6 +103,8 @@ export type CreateBaseTaskOpts<I extends InputType = UnknownInputType, O extends
|
|
|
103
103
|
* (optional) the concurrency options for the task
|
|
104
104
|
*/
|
|
105
105
|
concurrency?: Concurrency | Concurrency[];
|
|
106
|
+
/** @internal */
|
|
107
|
+
slotRequests?: Record<string, number>;
|
|
106
108
|
};
|
|
107
109
|
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> & {
|
|
108
110
|
/**
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const HATCHET_VERSION = "1.
|
|
1
|
+
export declare const HATCHET_VERSION = "1.12.1";
|
package/version.js
CHANGED
package/workflow.d.ts
CHANGED
|
@@ -380,6 +380,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
380
380
|
} | undefined;
|
|
381
381
|
}[];
|
|
382
382
|
id: string;
|
|
383
|
+
version?: string | undefined;
|
|
383
384
|
on?: {
|
|
384
385
|
cron: string;
|
|
385
386
|
event?: undefined;
|
|
@@ -388,7 +389,6 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
388
389
|
cron?: undefined;
|
|
389
390
|
} | undefined;
|
|
390
391
|
timeout?: string | undefined;
|
|
391
|
-
version?: string | undefined;
|
|
392
392
|
scheduleTimeout?: string | undefined;
|
|
393
393
|
sticky?: PbStickyStrategy | undefined;
|
|
394
394
|
onFailure?: {
|
|
@@ -442,6 +442,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
442
442
|
} | undefined;
|
|
443
443
|
}[];
|
|
444
444
|
id: string;
|
|
445
|
+
version?: string | undefined;
|
|
445
446
|
on?: {
|
|
446
447
|
cron: string;
|
|
447
448
|
event?: undefined;
|
|
@@ -450,7 +451,6 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
|
450
451
|
cron?: undefined;
|
|
451
452
|
} | undefined;
|
|
452
453
|
timeout?: string | undefined;
|
|
453
|
-
version?: string | undefined;
|
|
454
454
|
scheduleTimeout?: string | undefined;
|
|
455
455
|
sticky?: PbStickyStrategy | undefined;
|
|
456
456
|
onFailure?: {
|