@hatchet-dev/typescript-sdk 1.13.0 → 1.14.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 +1 -1
- package/clients/dispatcher/heartbeat/heartbeat-controller.js +13 -1
- package/clients/dispatcher/heartbeat/heartbeat-worker.js +4 -3
- package/clients/event/event-client.d.ts +1 -2
- package/clients/event/event-client.js +2 -2
- package/clients/hatchet-client/client-config.d.ts +15 -5
- package/clients/hatchet-client/client-config.js +3 -0
- package/clients/hatchet-client/hatchet-logger.js +1 -0
- package/clients/hatchet-client/index.d.ts +1 -1
- package/clients/hatchet-client/index.js +1 -1
- package/clients/listeners/durable-listener/durable-listener-client.d.ts +6 -0
- package/clients/listeners/durable-listener/durable-listener-client.js +8 -0
- package/clients/listeners/durable-listener/pooled-durable-listener-client.d.ts +9 -2
- package/clients/listeners/durable-listener/pooled-durable-listener-client.js +67 -15
- package/clients/listeners/run-listener/child-listener-client.js +1 -0
- package/clients/listeners/run-listener/pooled-child-listener-client.d.ts +10 -2
- package/clients/listeners/run-listener/pooled-child-listener-client.js +63 -7
- package/clients/rest/api.js +10 -2
- package/clients/rest/generated/Api.d.ts +2 -2
- package/clients/rest/generated/data-contracts.d.ts +6 -0
- package/index.d.ts +2 -3
- package/index.js +2 -3
- package/{examples → legacy/examples}/affinity-workers.js +2 -2
- package/{examples → legacy/examples}/bulk-fanout-trigger.js +1 -1
- package/{examples → legacy/examples}/bulk-fanout-worker.js +1 -1
- package/{examples → legacy/examples}/bulk-trigger.js +1 -1
- package/{examples → legacy/examples}/byo-logger.js +1 -1
- package/{examples → legacy/examples}/concurrency/cancel-in-progress/concurrency-event.js +1 -1
- package/{examples → legacy/examples}/concurrency/cancel-in-progress/concurrency-worker.js +1 -1
- package/{examples → legacy/examples}/concurrency/group-round-robin/concurrency-event.js +1 -1
- package/{examples → legacy/examples}/concurrency/group-round-robin/concurrency-worker-expression.js +2 -2
- package/{examples → legacy/examples}/concurrency/group-round-robin/concurrency-worker-key-fn.js +2 -2
- package/{examples → legacy/examples}/crons/cron-worker.d.ts +1 -1
- package/{examples → legacy/examples}/crons/cron-worker.js +1 -1
- package/{examples → legacy/examples}/crons/programatic-crons.js +1 -1
- package/{examples → legacy/examples}/dag-worker.js +1 -1
- package/{examples → legacy/examples}/example-event-with-results.js +2 -2
- package/{examples → legacy/examples}/example-event.js +1 -1
- package/{examples → legacy/examples}/fanout-worker.js +1 -1
- package/{examples → legacy/examples}/logger.js +1 -1
- package/{examples → legacy/examples}/manual-trigger.js +1 -1
- package/{examples → legacy/examples}/multi-workflow.js +1 -1
- package/{examples → legacy/examples}/namespaced-worker.js +1 -1
- package/{examples → legacy/examples}/on-failure.js +1 -1
- package/{examples → legacy/examples}/rate-limit/events.js +1 -1
- package/{examples → legacy/examples}/rate-limit/worker.js +2 -2
- package/{examples → legacy/examples}/retries-with-backoff.js +1 -1
- package/{examples → legacy/examples}/retries-worker.js +1 -1
- package/{examples → legacy/examples}/scheduled-runs/programatic-schedules.js +1 -1
- package/{examples → legacy/examples}/simple-worker.d.ts +1 -1
- package/{examples → legacy/examples}/simple-worker.js +1 -1
- package/{examples → legacy/examples}/sticky-trigger.js +1 -1
- package/{examples → legacy/examples}/sticky-worker-with-check.js +2 -2
- package/{examples → legacy/examples}/sticky-worker.js +2 -2
- package/{examples → legacy/examples}/stream-by-additional-meta.js +2 -2
- package/legacy/legacy-client.d.ts +30 -0
- package/legacy/legacy-client.js +67 -0
- package/legacy/legacy-transformer.d.ts +38 -0
- package/legacy/legacy-transformer.js +181 -0
- package/legacy/step.d.ts +429 -0
- package/legacy/step.js +662 -0
- package/legacy/workflow.d.ts +488 -0
- package/legacy/workflow.js +72 -0
- package/package.json +7 -7
- package/step.d.ts +1 -430
- package/step.js +6 -647
- package/util/abort-error.d.ts +38 -0
- package/util/abort-error.js +58 -0
- package/util/hatchet-promise/hatchet-promise.d.ts +8 -1
- package/util/hatchet-promise/hatchet-promise.js +3 -2
- package/util/logger/index.d.ts +1 -0
- package/util/logger/index.js +1 -0
- package/util/logger/task-run-log.d.ts +3 -0
- package/util/logger/task-run-log.js +20 -0
- package/util/sleep.d.ts +5 -2
- package/util/sleep.js +27 -4
- package/util/workflow-run-ref.d.ts +7 -1
- package/util/workflow-run-ref.js +5 -3
- package/v1/client/admin.d.ts +8 -1
- package/v1/client/admin.js +22 -6
- package/v1/client/client.d.ts +36 -18
- package/v1/client/client.interface.d.ts +9 -2
- package/v1/client/client.js +47 -27
- package/v1/client/features/crons.d.ts +3 -3
- package/v1/client/features/crons.js +2 -2
- package/v1/client/features/schedules.js +2 -2
- package/v1/client/features/workflows.d.ts +5 -5
- package/v1/client/features/workflows.js +7 -8
- package/v1/client/worker/context.d.ts +49 -10
- package/v1/client/worker/context.js +92 -20
- package/v1/client/worker/deprecated/legacy-v1-worker.d.ts +3 -3
- package/v1/client/worker/deprecated/legacy-v1-worker.js +2 -2
- package/v1/client/worker/deprecated/legacy-worker.js +9 -7
- package/v1/client/worker/slot-utils.d.ts +3 -3
- package/v1/client/worker/worker-internal.d.ts +7 -16
- package/v1/client/worker/worker-internal.js +225 -209
- package/v1/client/worker/worker.d.ts +18 -18
- package/v1/client/worker/worker.js +45 -30
- package/v1/declaration.d.ts +28 -7
- package/v1/declaration.js +56 -6
- package/v1/examples/__e2e__/harness.d.ts +19 -0
- package/v1/examples/__e2e__/harness.js +70 -0
- package/v1/examples/affinity/affinity-workers.js +4 -4
- package/v1/examples/bulk_fanout/workflow.d.ts +9 -0
- package/v1/examples/bulk_fanout/workflow.js +34 -0
- package/v1/examples/bulk_operations/workflow.d.ts +3 -0
- package/v1/examples/bulk_operations/workflow.js +44 -0
- package/v1/examples/cancellation/cancellation-workflow.d.ts +2 -0
- package/v1/examples/cancellation/cancellation-workflow.js +69 -0
- package/v1/examples/cancellation/run.js +53 -0
- package/v1/examples/cancellation/worker.d.ts +1 -0
- package/v1/examples/cancellation/worker.js +29 -0
- package/v1/examples/concurrency-types.d.ts +5 -0
- package/v1/examples/concurrency-types.js +2 -0
- package/v1/examples/concurrency_cancel_in_progress/workflow.d.ts +9 -0
- package/v1/examples/concurrency_cancel_in_progress/workflow.js +45 -0
- package/v1/examples/concurrency_cancel_newest/workflow.d.ts +9 -0
- package/v1/examples/concurrency_cancel_newest/workflow.js +45 -0
- package/v1/examples/concurrency_limit_rr/load.d.ts +1 -0
- package/v1/examples/concurrency_limit_rr/load.js +54 -0
- package/v1/examples/concurrency_limit_rr/run.d.ts +1 -0
- package/v1/examples/concurrency_limit_rr/run.js +39 -0
- package/v1/examples/concurrency_limit_rr/worker.d.ts +1 -0
- package/v1/examples/concurrency_limit_rr/worker.js +24 -0
- package/v1/examples/concurrency_limit_rr/workflow.d.ts +12 -0
- package/v1/examples/concurrency_limit_rr/workflow.js +62 -0
- package/v1/examples/concurrency_multiple_keys/workflow.d.ts +12 -0
- package/v1/examples/concurrency_multiple_keys/workflow.js +42 -0
- package/v1/examples/concurrency_workflow_level/workflow.d.ts +13 -0
- package/v1/examples/concurrency_workflow_level/workflow.js +49 -0
- package/v1/examples/conditions/complex-workflow.d.ts +1 -0
- package/v1/examples/conditions/complex-workflow.js +107 -0
- package/v1/examples/conditions/event.d.ts +1 -0
- package/v1/examples/conditions/event.js +28 -0
- package/v1/examples/conditions/run.d.ts +1 -0
- package/v1/examples/conditions/run.js +25 -0
- package/v1/examples/conditions/worker.d.ts +1 -0
- package/v1/examples/conditions/worker.js +24 -0
- package/v1/examples/conditions/workflow.d.ts +11 -0
- package/v1/examples/conditions/workflow.js +41 -0
- package/v1/examples/durable/workflow.d.ts +7 -0
- package/v1/examples/durable/workflow.js +116 -0
- package/v1/examples/durable_event/event.d.ts +1 -0
- package/v1/examples/durable_event/event.js +28 -0
- package/v1/examples/durable_event/run.d.ts +1 -0
- package/v1/examples/durable_event/run.js +30 -0
- package/v1/examples/durable_event/worker.d.ts +1 -0
- package/v1/examples/durable_event/worker.js +24 -0
- package/v1/examples/durable_event/workflow.d.ts +6 -0
- package/v1/examples/durable_event/workflow.js +46 -0
- package/v1/examples/durable_sleep/event.d.ts +1 -0
- package/v1/examples/durable_sleep/event.js +28 -0
- package/v1/examples/durable_sleep/run.d.ts +1 -0
- package/v1/examples/durable_sleep/run.js +30 -0
- package/v1/examples/durable_sleep/worker.d.ts +1 -0
- package/v1/examples/durable_sleep/worker.js +24 -0
- package/v1/examples/durable_sleep/workflow.d.ts +1 -0
- package/v1/examples/durable_sleep/workflow.js +31 -0
- package/v1/examples/e2e-worker.d.ts +1 -0
- package/v1/examples/e2e-worker.js +82 -0
- package/v1/examples/events/event.d.ts +1 -0
- package/v1/examples/events/event.js +53 -0
- package/v1/examples/events/filter.d.ts +1 -0
- package/v1/examples/events/filter.js +32 -0
- package/v1/examples/events/worker.d.ts +1 -0
- package/v1/examples/events/worker.js +24 -0
- package/v1/examples/events/workflow.d.ts +19 -0
- package/v1/examples/events/workflow.js +60 -0
- package/v1/examples/high-memory/workflow-with-child.js +1 -1
- package/v1/examples/logger/byo-logger.d.ts +1 -0
- package/v1/examples/logger/byo-logger.js +73 -0
- package/v1/examples/logger/logger.d.ts +1 -0
- package/v1/examples/logger/logger.js +46 -0
- package/v1/examples/logger/workflow.d.ts +2 -0
- package/v1/examples/logger/workflow.js +38 -0
- package/v1/examples/multiple_wf_concurrency/workflow.js +3 -3
- package/v1/examples/on_failure/workflow.d.ts +1 -0
- package/v1/examples/on_failure/workflow.js +12 -7
- package/v1/examples/priority/workflow.js +1 -1
- package/v1/examples/retries/workflow.js +2 -2
- package/v1/examples/return_exceptions/workflow.d.ts +6 -0
- package/v1/examples/return_exceptions/workflow.js +22 -0
- package/v1/examples/run_details/workflow.d.ts +4 -0
- package/v1/examples/run_details/workflow.js +65 -0
- package/v1/examples/simple/e2e-workflows.d.ts +14 -0
- package/v1/examples/simple/e2e-workflows.js +27 -0
- package/v1/examples/simple/enqueue.js +2 -2
- package/v1/examples/sticky/workflow.js +2 -2
- package/v1/examples/timeout/run.d.ts +1 -0
- package/v1/examples/timeout/run.js +30 -0
- package/v1/examples/timeout/worker.d.ts +1 -0
- package/v1/examples/timeout/worker.js +25 -0
- package/v1/examples/timeout/workflow.d.ts +10 -0
- package/v1/examples/timeout/workflow.js +56 -0
- package/v1/examples/webhooks/workflow.d.ts +5 -0
- package/v1/examples/webhooks/workflow.js +23 -0
- package/v1/index.d.ts +1 -0
- package/v1/index.js +1 -0
- package/v1/parent-run-context-vars.d.ts +6 -0
- package/v1/parent-run-context-vars.js +3 -0
- package/v1/task.d.ts +22 -7
- package/v1/task.js +4 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/workflow.d.ts +3 -491
- package/workflow.js +12 -62
- package/clients/hatchet-client/hatchet-client.d.ts +0 -35
- package/clients/hatchet-client/hatchet-client.js +0 -108
- package/clients/worker/handler.d.ts +0 -50
- package/clients/worker/handler.js +0 -214
- package/clients/worker/index.d.ts +0 -1
- package/clients/worker/index.js +0 -17
- package/clients/worker/worker.d.ts +0 -59
- package/clients/worker/worker.js +0 -568
- package/examples/webhooks.js +0 -45
- /package/{examples → legacy/examples}/affinity-workers.d.ts +0 -0
- /package/{examples → legacy/examples}/bulk-fanout-trigger.d.ts +0 -0
- /package/{examples → legacy/examples}/bulk-fanout-worker.d.ts +0 -0
- /package/{examples → legacy/examples}/bulk-trigger.d.ts +0 -0
- /package/{examples → legacy/examples}/byo-logger.d.ts +0 -0
- /package/{examples → legacy/examples}/concurrency/cancel-in-progress/concurrency-event.d.ts +0 -0
- /package/{examples → legacy/examples}/concurrency/cancel-in-progress/concurrency-worker.d.ts +0 -0
- /package/{examples → legacy/examples}/concurrency/group-round-robin/concurrency-event.d.ts +0 -0
- /package/{examples → legacy/examples}/concurrency/group-round-robin/concurrency-worker-expression.d.ts +0 -0
- /package/{examples → legacy/examples}/concurrency/group-round-robin/concurrency-worker-key-fn.d.ts +0 -0
- /package/{examples → legacy/examples}/crons/programatic-crons.d.ts +0 -0
- /package/{examples → legacy/examples}/dag-worker.d.ts +0 -0
- /package/{examples → legacy/examples}/example-event-with-results.d.ts +0 -0
- /package/{examples → legacy/examples}/example-event.d.ts +0 -0
- /package/{examples → legacy/examples}/fanout-worker.d.ts +0 -0
- /package/{examples → legacy/examples}/logger.d.ts +0 -0
- /package/{examples → legacy/examples}/manual-trigger.d.ts +0 -0
- /package/{examples → legacy/examples}/multi-workflow.d.ts +0 -0
- /package/{examples → legacy/examples}/namespaced-worker.d.ts +0 -0
- /package/{examples → legacy/examples}/on-failure.d.ts +0 -0
- /package/{examples → legacy/examples}/rate-limit/events.d.ts +0 -0
- /package/{examples → legacy/examples}/rate-limit/worker.d.ts +0 -0
- /package/{examples → legacy/examples}/retries-with-backoff.d.ts +0 -0
- /package/{examples → legacy/examples}/retries-worker.d.ts +0 -0
- /package/{examples → legacy/examples}/scheduled-runs/programatic-schedules.d.ts +0 -0
- /package/{examples → legacy/examples}/sticky-trigger.d.ts +0 -0
- /package/{examples → legacy/examples}/sticky-worker-with-check.d.ts +0 -0
- /package/{examples → legacy/examples}/sticky-worker.d.ts +0 -0
- /package/{examples → legacy/examples}/stream-by-additional-meta.d.ts +0 -0
- /package/{examples/webhooks.d.ts → v1/examples/cancellation/run.d.ts} +0 -0
package/workflow.d.ts
CHANGED
|
@@ -1,491 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare const StepsSchema: z.ZodArray<z.ZodObject<{
|
|
5
|
-
name: z.ZodString;
|
|
6
|
-
parents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7
|
-
timeout: z.ZodOptional<z.ZodString>;
|
|
8
|
-
retries: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
rate_limits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10
|
-
key: z.ZodOptional<z.ZodString>;
|
|
11
|
-
staticKey: z.ZodOptional<z.ZodString>;
|
|
12
|
-
dynamicKey: z.ZodOptional<z.ZodString>;
|
|
13
|
-
units: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
14
|
-
limit: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
15
|
-
duration: z.ZodOptional<z.ZodNativeEnum<typeof import("./protoc/workflows").RateLimitDuration>>;
|
|
16
|
-
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
units: string | number;
|
|
18
|
-
key?: string | undefined;
|
|
19
|
-
staticKey?: string | undefined;
|
|
20
|
-
dynamicKey?: string | undefined;
|
|
21
|
-
limit?: string | number | undefined;
|
|
22
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
23
|
-
}, {
|
|
24
|
-
units: string | number;
|
|
25
|
-
key?: string | undefined;
|
|
26
|
-
staticKey?: string | undefined;
|
|
27
|
-
dynamicKey?: string | undefined;
|
|
28
|
-
limit?: string | number | undefined;
|
|
29
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
30
|
-
}>, "many">>;
|
|
31
|
-
worker_labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
32
|
-
value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
33
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
-
weight: z.ZodOptional<z.ZodNumber>;
|
|
35
|
-
comparator: z.ZodOptional<z.ZodNativeEnum<typeof import("./protoc/workflows").WorkerLabelComparator>>;
|
|
36
|
-
}, "strip", z.ZodTypeAny, {
|
|
37
|
-
value: string | number;
|
|
38
|
-
required?: boolean | undefined;
|
|
39
|
-
weight?: number | undefined;
|
|
40
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
41
|
-
}, {
|
|
42
|
-
value: string | number;
|
|
43
|
-
required?: boolean | undefined;
|
|
44
|
-
weight?: number | undefined;
|
|
45
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
46
|
-
}>]>>>>>;
|
|
47
|
-
backoff: z.ZodOptional<z.ZodObject<{
|
|
48
|
-
factor: z.ZodOptional<z.ZodNumber>;
|
|
49
|
-
maxSeconds: z.ZodOptional<z.ZodNumber>;
|
|
50
|
-
}, "strip", z.ZodTypeAny, {
|
|
51
|
-
factor?: number | undefined;
|
|
52
|
-
maxSeconds?: number | undefined;
|
|
53
|
-
}, {
|
|
54
|
-
factor?: number | undefined;
|
|
55
|
-
maxSeconds?: number | undefined;
|
|
56
|
-
}>>;
|
|
57
|
-
}, "strip", z.ZodTypeAny, {
|
|
58
|
-
name: string;
|
|
59
|
-
timeout?: string | undefined;
|
|
60
|
-
parents?: string[] | undefined;
|
|
61
|
-
retries?: number | undefined;
|
|
62
|
-
rate_limits?: {
|
|
63
|
-
units: string | number;
|
|
64
|
-
key?: string | undefined;
|
|
65
|
-
staticKey?: string | undefined;
|
|
66
|
-
dynamicKey?: string | undefined;
|
|
67
|
-
limit?: string | number | undefined;
|
|
68
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
69
|
-
}[] | undefined;
|
|
70
|
-
worker_labels?: Record<string, string | number | {
|
|
71
|
-
value: string | number;
|
|
72
|
-
required?: boolean | undefined;
|
|
73
|
-
weight?: number | undefined;
|
|
74
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
75
|
-
} | undefined> | undefined;
|
|
76
|
-
backoff?: {
|
|
77
|
-
factor?: number | undefined;
|
|
78
|
-
maxSeconds?: number | undefined;
|
|
79
|
-
} | undefined;
|
|
80
|
-
}, {
|
|
81
|
-
name: string;
|
|
82
|
-
timeout?: string | undefined;
|
|
83
|
-
parents?: string[] | undefined;
|
|
84
|
-
retries?: number | undefined;
|
|
85
|
-
rate_limits?: {
|
|
86
|
-
units: string | number;
|
|
87
|
-
key?: string | undefined;
|
|
88
|
-
staticKey?: string | undefined;
|
|
89
|
-
dynamicKey?: string | undefined;
|
|
90
|
-
limit?: string | number | undefined;
|
|
91
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
92
|
-
}[] | undefined;
|
|
93
|
-
worker_labels?: Record<string, string | number | {
|
|
94
|
-
value: string | number;
|
|
95
|
-
required?: boolean | undefined;
|
|
96
|
-
weight?: number | undefined;
|
|
97
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
98
|
-
} | undefined> | undefined;
|
|
99
|
-
backoff?: {
|
|
100
|
-
factor?: number | undefined;
|
|
101
|
-
maxSeconds?: number | undefined;
|
|
102
|
-
} | undefined;
|
|
103
|
-
}>, "many">;
|
|
104
|
-
export type Steps = z.infer<typeof StepsSchema>;
|
|
105
|
-
export declare const ConcurrencyLimitStrategy: typeof PbConcurrencyLimitStrategy;
|
|
106
|
-
export declare const WorkflowConcurrency: z.ZodObject<{
|
|
107
|
-
name: z.ZodString;
|
|
108
|
-
maxRuns: z.ZodOptional<z.ZodNumber>;
|
|
109
|
-
limitStrategy: z.ZodOptional<z.ZodNativeEnum<typeof PbConcurrencyLimitStrategy>>;
|
|
110
|
-
expression: z.ZodOptional<z.ZodString>;
|
|
111
|
-
}, "strip", z.ZodTypeAny, {
|
|
112
|
-
name: string;
|
|
113
|
-
maxRuns?: number | undefined;
|
|
114
|
-
limitStrategy?: PbConcurrencyLimitStrategy | undefined;
|
|
115
|
-
expression?: string | undefined;
|
|
116
|
-
}, {
|
|
117
|
-
name: string;
|
|
118
|
-
maxRuns?: number | undefined;
|
|
119
|
-
limitStrategy?: PbConcurrencyLimitStrategy | undefined;
|
|
120
|
-
expression?: string | undefined;
|
|
121
|
-
}>;
|
|
122
|
-
export declare const HatchetTimeoutSchema: z.ZodString;
|
|
123
|
-
export declare const StickyStrategy: typeof PbStickyStrategy;
|
|
124
|
-
export declare const CreateWorkflowSchema: z.ZodObject<{
|
|
125
|
-
id: z.ZodString;
|
|
126
|
-
description: z.ZodString;
|
|
127
|
-
version: z.ZodOptional<z.ZodString>;
|
|
128
|
-
/**
|
|
129
|
-
* sticky will attempt to run all steps for workflow on the same worker
|
|
130
|
-
*/
|
|
131
|
-
sticky: z.ZodOptional<z.ZodNativeEnum<typeof PbStickyStrategy>>;
|
|
132
|
-
scheduleTimeout: z.ZodOptional<z.ZodString>;
|
|
133
|
-
/**
|
|
134
|
-
* @deprecated Workflow timeout is deprecated. Use step timeouts instead.
|
|
135
|
-
*/
|
|
136
|
-
timeout: z.ZodOptional<z.ZodString>;
|
|
137
|
-
on: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
138
|
-
cron: z.ZodString;
|
|
139
|
-
event: z.ZodUndefined;
|
|
140
|
-
}, "strip", z.ZodTypeAny, {
|
|
141
|
-
cron: string;
|
|
142
|
-
event?: undefined;
|
|
143
|
-
}, {
|
|
144
|
-
cron: string;
|
|
145
|
-
event?: undefined;
|
|
146
|
-
}>, z.ZodObject<{
|
|
147
|
-
cron: z.ZodUndefined;
|
|
148
|
-
event: z.ZodString;
|
|
149
|
-
}, "strip", z.ZodTypeAny, {
|
|
150
|
-
event: string;
|
|
151
|
-
cron?: undefined;
|
|
152
|
-
}, {
|
|
153
|
-
event: string;
|
|
154
|
-
cron?: undefined;
|
|
155
|
-
}>]>>;
|
|
156
|
-
steps: z.ZodArray<z.ZodObject<{
|
|
157
|
-
name: z.ZodString;
|
|
158
|
-
parents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
159
|
-
timeout: z.ZodOptional<z.ZodString>;
|
|
160
|
-
retries: z.ZodOptional<z.ZodNumber>;
|
|
161
|
-
rate_limits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
162
|
-
key: z.ZodOptional<z.ZodString>;
|
|
163
|
-
staticKey: z.ZodOptional<z.ZodString>;
|
|
164
|
-
dynamicKey: z.ZodOptional<z.ZodString>;
|
|
165
|
-
units: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
166
|
-
limit: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
167
|
-
duration: z.ZodOptional<z.ZodNativeEnum<typeof import("./protoc/workflows").RateLimitDuration>>;
|
|
168
|
-
}, "strip", z.ZodTypeAny, {
|
|
169
|
-
units: string | number;
|
|
170
|
-
key?: string | undefined;
|
|
171
|
-
staticKey?: string | undefined;
|
|
172
|
-
dynamicKey?: string | undefined;
|
|
173
|
-
limit?: string | number | undefined;
|
|
174
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
175
|
-
}, {
|
|
176
|
-
units: string | number;
|
|
177
|
-
key?: string | undefined;
|
|
178
|
-
staticKey?: string | undefined;
|
|
179
|
-
dynamicKey?: string | undefined;
|
|
180
|
-
limit?: string | number | undefined;
|
|
181
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
182
|
-
}>, "many">>;
|
|
183
|
-
worker_labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
184
|
-
value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
185
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
186
|
-
weight: z.ZodOptional<z.ZodNumber>;
|
|
187
|
-
comparator: z.ZodOptional<z.ZodNativeEnum<typeof import("./protoc/workflows").WorkerLabelComparator>>;
|
|
188
|
-
}, "strip", z.ZodTypeAny, {
|
|
189
|
-
value: string | number;
|
|
190
|
-
required?: boolean | undefined;
|
|
191
|
-
weight?: number | undefined;
|
|
192
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
193
|
-
}, {
|
|
194
|
-
value: string | number;
|
|
195
|
-
required?: boolean | undefined;
|
|
196
|
-
weight?: number | undefined;
|
|
197
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
198
|
-
}>]>>>>>;
|
|
199
|
-
backoff: z.ZodOptional<z.ZodObject<{
|
|
200
|
-
factor: z.ZodOptional<z.ZodNumber>;
|
|
201
|
-
maxSeconds: z.ZodOptional<z.ZodNumber>;
|
|
202
|
-
}, "strip", z.ZodTypeAny, {
|
|
203
|
-
factor?: number | undefined;
|
|
204
|
-
maxSeconds?: number | undefined;
|
|
205
|
-
}, {
|
|
206
|
-
factor?: number | undefined;
|
|
207
|
-
maxSeconds?: number | undefined;
|
|
208
|
-
}>>;
|
|
209
|
-
}, "strip", z.ZodTypeAny, {
|
|
210
|
-
name: string;
|
|
211
|
-
timeout?: string | undefined;
|
|
212
|
-
parents?: string[] | undefined;
|
|
213
|
-
retries?: number | undefined;
|
|
214
|
-
rate_limits?: {
|
|
215
|
-
units: string | number;
|
|
216
|
-
key?: string | undefined;
|
|
217
|
-
staticKey?: string | undefined;
|
|
218
|
-
dynamicKey?: string | undefined;
|
|
219
|
-
limit?: string | number | undefined;
|
|
220
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
221
|
-
}[] | undefined;
|
|
222
|
-
worker_labels?: Record<string, string | number | {
|
|
223
|
-
value: string | number;
|
|
224
|
-
required?: boolean | undefined;
|
|
225
|
-
weight?: number | undefined;
|
|
226
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
227
|
-
} | undefined> | undefined;
|
|
228
|
-
backoff?: {
|
|
229
|
-
factor?: number | undefined;
|
|
230
|
-
maxSeconds?: number | undefined;
|
|
231
|
-
} | undefined;
|
|
232
|
-
}, {
|
|
233
|
-
name: string;
|
|
234
|
-
timeout?: string | undefined;
|
|
235
|
-
parents?: string[] | undefined;
|
|
236
|
-
retries?: number | undefined;
|
|
237
|
-
rate_limits?: {
|
|
238
|
-
units: string | number;
|
|
239
|
-
key?: string | undefined;
|
|
240
|
-
staticKey?: string | undefined;
|
|
241
|
-
dynamicKey?: string | undefined;
|
|
242
|
-
limit?: string | number | undefined;
|
|
243
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
244
|
-
}[] | undefined;
|
|
245
|
-
worker_labels?: Record<string, string | number | {
|
|
246
|
-
value: string | number;
|
|
247
|
-
required?: boolean | undefined;
|
|
248
|
-
weight?: number | undefined;
|
|
249
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
250
|
-
} | undefined> | undefined;
|
|
251
|
-
backoff?: {
|
|
252
|
-
factor?: number | undefined;
|
|
253
|
-
maxSeconds?: number | undefined;
|
|
254
|
-
} | undefined;
|
|
255
|
-
}>, "many">;
|
|
256
|
-
onFailure: z.ZodOptional<z.ZodObject<{
|
|
257
|
-
name: z.ZodString;
|
|
258
|
-
parents: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
259
|
-
timeout: z.ZodOptional<z.ZodString>;
|
|
260
|
-
retries: z.ZodOptional<z.ZodNumber>;
|
|
261
|
-
rate_limits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
262
|
-
key: z.ZodOptional<z.ZodString>;
|
|
263
|
-
staticKey: z.ZodOptional<z.ZodString>;
|
|
264
|
-
dynamicKey: z.ZodOptional<z.ZodString>;
|
|
265
|
-
units: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
266
|
-
limit: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
267
|
-
duration: z.ZodOptional<z.ZodNativeEnum<typeof import("./protoc/workflows").RateLimitDuration>>;
|
|
268
|
-
}, "strip", z.ZodTypeAny, {
|
|
269
|
-
units: string | number;
|
|
270
|
-
key?: string | undefined;
|
|
271
|
-
staticKey?: string | undefined;
|
|
272
|
-
dynamicKey?: string | undefined;
|
|
273
|
-
limit?: string | number | undefined;
|
|
274
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
275
|
-
}, {
|
|
276
|
-
units: string | number;
|
|
277
|
-
key?: string | undefined;
|
|
278
|
-
staticKey?: string | undefined;
|
|
279
|
-
dynamicKey?: string | undefined;
|
|
280
|
-
limit?: string | number | undefined;
|
|
281
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
282
|
-
}>, "many">>;
|
|
283
|
-
worker_labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
284
|
-
value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
285
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
286
|
-
weight: z.ZodOptional<z.ZodNumber>;
|
|
287
|
-
comparator: z.ZodOptional<z.ZodNativeEnum<typeof import("./protoc/workflows").WorkerLabelComparator>>;
|
|
288
|
-
}, "strip", z.ZodTypeAny, {
|
|
289
|
-
value: string | number;
|
|
290
|
-
required?: boolean | undefined;
|
|
291
|
-
weight?: number | undefined;
|
|
292
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
293
|
-
}, {
|
|
294
|
-
value: string | number;
|
|
295
|
-
required?: boolean | undefined;
|
|
296
|
-
weight?: number | undefined;
|
|
297
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
298
|
-
}>]>>>>>;
|
|
299
|
-
backoff: z.ZodOptional<z.ZodObject<{
|
|
300
|
-
factor: z.ZodOptional<z.ZodNumber>;
|
|
301
|
-
maxSeconds: z.ZodOptional<z.ZodNumber>;
|
|
302
|
-
}, "strip", z.ZodTypeAny, {
|
|
303
|
-
factor?: number | undefined;
|
|
304
|
-
maxSeconds?: number | undefined;
|
|
305
|
-
}, {
|
|
306
|
-
factor?: number | undefined;
|
|
307
|
-
maxSeconds?: number | undefined;
|
|
308
|
-
}>>;
|
|
309
|
-
}, "strip", z.ZodTypeAny, {
|
|
310
|
-
name: string;
|
|
311
|
-
timeout?: string | undefined;
|
|
312
|
-
parents?: string[] | undefined;
|
|
313
|
-
retries?: number | undefined;
|
|
314
|
-
rate_limits?: {
|
|
315
|
-
units: string | number;
|
|
316
|
-
key?: string | undefined;
|
|
317
|
-
staticKey?: string | undefined;
|
|
318
|
-
dynamicKey?: string | undefined;
|
|
319
|
-
limit?: string | number | undefined;
|
|
320
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
321
|
-
}[] | undefined;
|
|
322
|
-
worker_labels?: Record<string, string | number | {
|
|
323
|
-
value: string | number;
|
|
324
|
-
required?: boolean | undefined;
|
|
325
|
-
weight?: number | undefined;
|
|
326
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
327
|
-
} | undefined> | undefined;
|
|
328
|
-
backoff?: {
|
|
329
|
-
factor?: number | undefined;
|
|
330
|
-
maxSeconds?: number | undefined;
|
|
331
|
-
} | undefined;
|
|
332
|
-
}, {
|
|
333
|
-
name: string;
|
|
334
|
-
timeout?: string | undefined;
|
|
335
|
-
parents?: string[] | undefined;
|
|
336
|
-
retries?: number | undefined;
|
|
337
|
-
rate_limits?: {
|
|
338
|
-
units: string | number;
|
|
339
|
-
key?: string | undefined;
|
|
340
|
-
staticKey?: string | undefined;
|
|
341
|
-
dynamicKey?: string | undefined;
|
|
342
|
-
limit?: string | number | undefined;
|
|
343
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
344
|
-
}[] | undefined;
|
|
345
|
-
worker_labels?: Record<string, string | number | {
|
|
346
|
-
value: string | number;
|
|
347
|
-
required?: boolean | undefined;
|
|
348
|
-
weight?: number | undefined;
|
|
349
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
350
|
-
} | undefined> | undefined;
|
|
351
|
-
backoff?: {
|
|
352
|
-
factor?: number | undefined;
|
|
353
|
-
maxSeconds?: number | undefined;
|
|
354
|
-
} | undefined;
|
|
355
|
-
}>>;
|
|
356
|
-
}, "strip", z.ZodTypeAny, {
|
|
357
|
-
id: string;
|
|
358
|
-
description: string;
|
|
359
|
-
steps: {
|
|
360
|
-
name: string;
|
|
361
|
-
timeout?: string | undefined;
|
|
362
|
-
parents?: string[] | undefined;
|
|
363
|
-
retries?: number | undefined;
|
|
364
|
-
rate_limits?: {
|
|
365
|
-
units: string | number;
|
|
366
|
-
key?: string | undefined;
|
|
367
|
-
staticKey?: string | undefined;
|
|
368
|
-
dynamicKey?: string | undefined;
|
|
369
|
-
limit?: string | number | undefined;
|
|
370
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
371
|
-
}[] | undefined;
|
|
372
|
-
worker_labels?: Record<string, string | number | {
|
|
373
|
-
value: string | number;
|
|
374
|
-
required?: boolean | undefined;
|
|
375
|
-
weight?: number | undefined;
|
|
376
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
377
|
-
} | undefined> | undefined;
|
|
378
|
-
backoff?: {
|
|
379
|
-
factor?: number | undefined;
|
|
380
|
-
maxSeconds?: number | undefined;
|
|
381
|
-
} | undefined;
|
|
382
|
-
}[];
|
|
383
|
-
version?: string | undefined;
|
|
384
|
-
timeout?: string | undefined;
|
|
385
|
-
sticky?: PbStickyStrategy | undefined;
|
|
386
|
-
scheduleTimeout?: string | undefined;
|
|
387
|
-
on?: {
|
|
388
|
-
cron: string;
|
|
389
|
-
event?: undefined;
|
|
390
|
-
} | {
|
|
391
|
-
event: string;
|
|
392
|
-
cron?: undefined;
|
|
393
|
-
} | undefined;
|
|
394
|
-
onFailure?: {
|
|
395
|
-
name: string;
|
|
396
|
-
timeout?: string | undefined;
|
|
397
|
-
parents?: string[] | undefined;
|
|
398
|
-
retries?: number | undefined;
|
|
399
|
-
rate_limits?: {
|
|
400
|
-
units: string | number;
|
|
401
|
-
key?: string | undefined;
|
|
402
|
-
staticKey?: string | undefined;
|
|
403
|
-
dynamicKey?: string | undefined;
|
|
404
|
-
limit?: string | number | undefined;
|
|
405
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
406
|
-
}[] | undefined;
|
|
407
|
-
worker_labels?: Record<string, string | number | {
|
|
408
|
-
value: string | number;
|
|
409
|
-
required?: boolean | undefined;
|
|
410
|
-
weight?: number | undefined;
|
|
411
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
412
|
-
} | undefined> | undefined;
|
|
413
|
-
backoff?: {
|
|
414
|
-
factor?: number | undefined;
|
|
415
|
-
maxSeconds?: number | undefined;
|
|
416
|
-
} | undefined;
|
|
417
|
-
} | undefined;
|
|
418
|
-
}, {
|
|
419
|
-
id: string;
|
|
420
|
-
description: string;
|
|
421
|
-
steps: {
|
|
422
|
-
name: string;
|
|
423
|
-
timeout?: string | undefined;
|
|
424
|
-
parents?: string[] | undefined;
|
|
425
|
-
retries?: number | undefined;
|
|
426
|
-
rate_limits?: {
|
|
427
|
-
units: string | number;
|
|
428
|
-
key?: string | undefined;
|
|
429
|
-
staticKey?: string | undefined;
|
|
430
|
-
dynamicKey?: string | undefined;
|
|
431
|
-
limit?: string | number | undefined;
|
|
432
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
433
|
-
}[] | undefined;
|
|
434
|
-
worker_labels?: Record<string, string | number | {
|
|
435
|
-
value: string | number;
|
|
436
|
-
required?: boolean | undefined;
|
|
437
|
-
weight?: number | undefined;
|
|
438
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
439
|
-
} | undefined> | undefined;
|
|
440
|
-
backoff?: {
|
|
441
|
-
factor?: number | undefined;
|
|
442
|
-
maxSeconds?: number | undefined;
|
|
443
|
-
} | undefined;
|
|
444
|
-
}[];
|
|
445
|
-
version?: string | undefined;
|
|
446
|
-
timeout?: string | undefined;
|
|
447
|
-
sticky?: PbStickyStrategy | undefined;
|
|
448
|
-
scheduleTimeout?: string | undefined;
|
|
449
|
-
on?: {
|
|
450
|
-
cron: string;
|
|
451
|
-
event?: undefined;
|
|
452
|
-
} | {
|
|
453
|
-
event: string;
|
|
454
|
-
cron?: undefined;
|
|
455
|
-
} | undefined;
|
|
456
|
-
onFailure?: {
|
|
457
|
-
name: string;
|
|
458
|
-
timeout?: string | undefined;
|
|
459
|
-
parents?: string[] | undefined;
|
|
460
|
-
retries?: number | undefined;
|
|
461
|
-
rate_limits?: {
|
|
462
|
-
units: string | number;
|
|
463
|
-
key?: string | undefined;
|
|
464
|
-
staticKey?: string | undefined;
|
|
465
|
-
dynamicKey?: string | undefined;
|
|
466
|
-
limit?: string | number | undefined;
|
|
467
|
-
duration?: import("./protoc/workflows").RateLimitDuration | undefined;
|
|
468
|
-
}[] | undefined;
|
|
469
|
-
worker_labels?: Record<string, string | number | {
|
|
470
|
-
value: string | number;
|
|
471
|
-
required?: boolean | undefined;
|
|
472
|
-
weight?: number | undefined;
|
|
473
|
-
comparator?: import("./protoc/workflows").WorkerLabelComparator | undefined;
|
|
474
|
-
} | undefined> | undefined;
|
|
475
|
-
backoff?: {
|
|
476
|
-
factor?: number | undefined;
|
|
477
|
-
maxSeconds?: number | undefined;
|
|
478
|
-
} | undefined;
|
|
479
|
-
} | undefined;
|
|
480
|
-
}>;
|
|
481
|
-
/**
|
|
482
|
-
* @deprecated Use client.workflow instead (TODO link to migration doc)
|
|
483
|
-
*/
|
|
484
|
-
export interface Workflow extends z.infer<typeof CreateWorkflowSchema> {
|
|
485
|
-
concurrency?: z.infer<typeof WorkflowConcurrency> & {
|
|
486
|
-
key?: (ctx: any) => string;
|
|
487
|
-
};
|
|
488
|
-
steps: CreateStep<any, any>[];
|
|
489
|
-
onFailure?: CreateStep<any, any>;
|
|
490
|
-
}
|
|
491
|
-
export {};
|
|
1
|
+
import { ConcurrencyLimitStrategy, StickyStrategy } from './v1';
|
|
2
|
+
export * from './legacy/workflow';
|
|
3
|
+
export { ConcurrencyLimitStrategy, StickyStrategy };
|
package/workflow.js
CHANGED
|
@@ -10,66 +10,16 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
35
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
cron: z.undefined(),
|
|
46
|
-
event: z.string(),
|
|
47
|
-
});
|
|
48
|
-
const OnConfigSchema = z.union([CronConfigSchema, EventConfigSchema]).optional();
|
|
49
|
-
const StepsSchema = z.array(step_1.CreateStepSchema);
|
|
50
|
-
exports.ConcurrencyLimitStrategy = workflows_1.ConcurrencyLimitStrategy;
|
|
51
|
-
exports.WorkflowConcurrency = z.object({
|
|
52
|
-
name: z.string(),
|
|
53
|
-
maxRuns: z.number().optional(),
|
|
54
|
-
limitStrategy: z.nativeEnum(exports.ConcurrencyLimitStrategy).optional(),
|
|
55
|
-
expression: z.string().optional(),
|
|
56
|
-
});
|
|
57
|
-
exports.HatchetTimeoutSchema = z.string();
|
|
58
|
-
exports.StickyStrategy = workflows_1.StickyStrategy;
|
|
59
|
-
exports.CreateWorkflowSchema = z.object({
|
|
60
|
-
id: z.string(),
|
|
61
|
-
description: z.string(),
|
|
62
|
-
version: z.string().optional(),
|
|
63
|
-
/**
|
|
64
|
-
* sticky will attempt to run all steps for workflow on the same worker
|
|
65
|
-
*/
|
|
66
|
-
sticky: z.nativeEnum(exports.StickyStrategy).optional(),
|
|
67
|
-
scheduleTimeout: z.string().optional(),
|
|
68
|
-
/**
|
|
69
|
-
* @deprecated Workflow timeout is deprecated. Use step timeouts instead.
|
|
70
|
-
*/
|
|
71
|
-
timeout: exports.HatchetTimeoutSchema.optional(),
|
|
72
|
-
on: OnConfigSchema,
|
|
73
|
-
steps: StepsSchema,
|
|
74
|
-
onFailure: step_1.CreateStepSchema === null || step_1.CreateStepSchema === void 0 ? void 0 : step_1.CreateStepSchema.optional(),
|
|
75
|
-
});
|
|
17
|
+
exports.StickyStrategy = exports.ConcurrencyLimitStrategy = void 0;
|
|
18
|
+
const v1_1 = require("./v1");
|
|
19
|
+
Object.defineProperty(exports, "ConcurrencyLimitStrategy", { enumerable: true, get: function () { return v1_1.ConcurrencyLimitStrategy; } });
|
|
20
|
+
Object.defineProperty(exports, "StickyStrategy", { enumerable: true, get: function () { return v1_1.StickyStrategy; } });
|
|
21
|
+
__exportStar(require("./legacy/workflow"), exports);
|
|
22
|
+
console.warn('\x1b[31mDeprecation warning: The v0 sdk, including the workflow module has been deprecated and has been removed in release v1.14.0.\x1b[0m');
|
|
23
|
+
console.warn('\x1b[31mPlease migrate to v1 SDK instead: https://docs.hatchet.run/home/v1-sdk-improvements\x1b[0m');
|
|
24
|
+
console.warn('ConcurrencyLimitStrategy, StickyStrategy have been moved to @hatchet-dev/typescript-sdk/v1');
|
|
25
|
+
console.warn('--------------------------------');
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { EventClient } from '../event/event-client';
|
|
2
|
-
import { DispatcherClient } from '../dispatcher/dispatcher-client';
|
|
3
|
-
import { AdminClient } from '../admin/admin-client';
|
|
4
|
-
import { ChannelCredentials } from 'nice-grpc';
|
|
5
|
-
import { Workflow as V0Workflow } from '../../workflow';
|
|
6
|
-
import { V0Worker, WorkerOpts } from '../worker';
|
|
7
|
-
import { AxiosRequestConfig } from 'axios';
|
|
8
|
-
import { Logger } from '../../util/logger';
|
|
9
|
-
import { RunsClient } from '../../v1';
|
|
10
|
-
import { ClientConfig } from './client-config';
|
|
11
|
-
import { RunListenerClient } from '../listeners/run-listener/child-listener-client';
|
|
12
|
-
import { Api } from '../rest/generated/Api';
|
|
13
|
-
import { DurableListenerClient } from '../listeners/durable-listener/durable-listener-client';
|
|
14
|
-
export interface HatchetClientOptions {
|
|
15
|
-
config_path?: string;
|
|
16
|
-
credentials?: ChannelCredentials;
|
|
17
|
-
}
|
|
18
|
-
export declare class LegacyHatchetClient {
|
|
19
|
-
config: ClientConfig;
|
|
20
|
-
credentials: ChannelCredentials;
|
|
21
|
-
event: EventClient;
|
|
22
|
-
dispatcher: DispatcherClient;
|
|
23
|
-
admin: AdminClient;
|
|
24
|
-
api: Api;
|
|
25
|
-
runs: RunsClient | undefined;
|
|
26
|
-
listener: RunListenerClient;
|
|
27
|
-
tenantId: string;
|
|
28
|
-
durableListener: DurableListenerClient;
|
|
29
|
-
logger: Logger;
|
|
30
|
-
constructor(config?: Partial<ClientConfig>, options?: HatchetClientOptions, axiosOpts?: AxiosRequestConfig, runs?: RunsClient, listener?: RunListenerClient);
|
|
31
|
-
static init(config?: Partial<ClientConfig>, options?: HatchetClientOptions, axiosConfig?: AxiosRequestConfig): LegacyHatchetClient;
|
|
32
|
-
run(workflow: string | V0Workflow): Promise<V0Worker>;
|
|
33
|
-
worker(workflow: string | V0Workflow, opts?: Omit<WorkerOpts, 'name'> | number): Promise<V0Worker>;
|
|
34
|
-
webhooks(workflows: Array<V0Workflow>): import("../worker/handler").WebhookHandler;
|
|
35
|
-
}
|