@hatchet-dev/typescript-sdk 1.14.0 → 1.15.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/docs/doc_types.d.ts +12 -0
- package/docs/doc_types.js +62 -0
- package/docs/generate.js +87 -0
- package/docs/paths.d.ts +2 -0
- package/docs/paths.js +16 -0
- package/docs/shared.d.ts +3 -0
- package/docs/shared.js +6 -0
- package/package.json +4 -3
- package/{clients → src/clients}/admin/admin-client.d.ts +17 -9
- package/{clients → src/clients}/admin/admin-client.js +26 -10
- package/{clients → src/clients}/dispatcher/action-listener.d.ts +4 -4
- package/{clients → src/clients}/dispatcher/action-listener.js +3 -3
- package/{clients → src/clients}/dispatcher/dispatcher-client.d.ts +9 -9
- package/{clients → src/clients}/dispatcher/dispatcher-client.js +5 -5
- package/{clients → src/clients}/dispatcher/heartbeat/heartbeat-controller.d.ts +2 -2
- package/{clients → src/clients}/dispatcher/heartbeat/heartbeat-controller.js +1 -1
- package/{clients → src/clients}/dispatcher/heartbeat/heartbeat-worker.js +3 -3
- package/{clients → src/clients}/event/event-client.d.ts +7 -7
- package/{clients → src/clients}/event/event-client.js +4 -4
- package/{clients → src/clients}/hatchet-client/client-config.d.ts +2 -2
- package/{clients → src/clients}/hatchet-client/hatchet-logger.d.ts +1 -1
- package/{clients → src/clients}/hatchet-client/hatchet-logger.js +1 -1
- package/src/clients/hatchet-client/index.d.ts +3 -0
- package/{clients → src/clients}/hatchet-client/index.js +1 -1
- package/{clients → src/clients}/listeners/durable-listener/durable-listener-client.d.ts +6 -6
- package/{clients → src/clients}/listeners/durable-listener/durable-listener-client.js +1 -1
- package/{clients → src/clients}/listeners/durable-listener/pooled-durable-listener-client.d.ts +2 -2
- package/{clients → src/clients}/listeners/durable-listener/pooled-durable-listener-client.js +2 -2
- package/{clients → src/clients}/listeners/run-listener/child-listener-client.d.ts +3 -3
- package/{clients → src/clients}/listeners/run-listener/child-listener-client.js +3 -3
- package/{clients → src/clients}/listeners/run-listener/pooled-child-listener-client.d.ts +1 -1
- package/{clients → src/clients}/listeners/run-listener/pooled-child-listener-client.js +3 -3
- package/{index.d.ts → src/index.d.ts} +1 -1
- package/{index.js → src/index.js} +1 -1
- package/{legacy → src/legacy}/examples/affinity-workers.js +1 -1
- package/{legacy → src/legacy}/legacy-client.d.ts +9 -9
- package/{legacy → src/legacy}/legacy-client.js +10 -10
- package/{legacy → src/legacy}/legacy-transformer.d.ts +2 -2
- package/{legacy → src/legacy}/legacy-transformer.js +1 -1
- package/{legacy → src/legacy}/step.js +1 -1
- package/{protoc → src/protoc}/v1/workflows.d.ts +8 -0
- package/{protoc → src/protoc}/v1/workflows.js +109 -2
- package/{protoc → src/protoc}/workflows/workflows.d.ts +9 -0
- package/{protoc → src/protoc}/workflows/workflows.js +109 -2
- package/src/sdk.d.ts +2 -0
- package/{sdk.js → src/sdk.js} +1 -1
- package/{util → src/util}/config-loader/config-loader.d.ts +1 -1
- package/{util → src/util}/config-loader/config-loader.js +1 -1
- package/{util → src/util}/grpc-helpers.d.ts +1 -1
- package/{util → src/util}/logger/logger.d.ts +1 -1
- package/{util → src/util}/workflow-run-ref.d.ts +2 -2
- package/{v1 → src/v1}/client/admin.d.ts +18 -9
- package/{v1 → src/v1}/client/admin.js +29 -13
- package/{v1 → src/v1}/client/client.d.ts +27 -9
- package/{v1 → src/v1}/client/client.interface.d.ts +3 -3
- package/{v1 → src/v1}/client/client.js +28 -10
- package/{v1 → src/v1}/client/features/cel.d.ts +1 -1
- package/{v1 → src/v1}/client/features/cel.js +1 -1
- package/{v1 → src/v1}/client/features/crons.d.ts +6 -4
- package/{v1 → src/v1}/client/features/crons.js +4 -3
- package/{v1 → src/v1}/client/features/filters.d.ts +30 -0
- package/{v1 → src/v1}/client/features/filters.js +30 -0
- package/{v1 → src/v1}/client/features/metrics.d.ts +10 -6
- package/{v1 → src/v1}/client/features/metrics.js +10 -6
- package/src/v1/client/features/ratelimits.d.ts +30 -0
- package/{v1 → src/v1}/client/features/ratelimits.js +13 -3
- package/{v1 → src/v1}/client/features/runs.d.ts +43 -8
- package/{v1 → src/v1}/client/features/runs.js +38 -3
- package/{v1 → src/v1}/client/features/schedules.d.ts +7 -4
- package/{v1 → src/v1}/client/features/schedules.js +5 -3
- package/{v1 → src/v1}/client/features/tenant.d.ts +4 -1
- package/src/v1/client/features/webhooks.d.ts +54 -0
- package/{v1 → src/v1}/client/features/webhooks.js +31 -5
- package/src/v1/client/features/workers.d.ts +38 -0
- package/{v1 → src/v1}/client/features/workers.js +25 -1
- package/{v1 → src/v1}/client/features/workflows.d.ts +21 -3
- package/{v1 → src/v1}/client/features/workflows.js +21 -3
- package/{v1 → src/v1}/client/worker/context.d.ts +31 -10
- package/{v1 → src/v1}/client/worker/context.js +29 -8
- package/{v1 → src/v1}/client/worker/deprecated/deprecation.d.ts +1 -1
- package/{v1 → src/v1}/client/worker/deprecated/legacy-registration.d.ts +2 -2
- package/{v1 → src/v1}/client/worker/deprecated/legacy-registration.js +2 -2
- package/{v1 → src/v1}/client/worker/deprecated/legacy-v1-worker.d.ts +2 -2
- package/{v1 → src/v1}/client/worker/health-server.d.ts +1 -1
- package/{v1 → src/v1}/client/worker/worker-internal.d.ts +8 -8
- package/{v1 → src/v1}/client/worker/worker-internal.js +10 -10
- package/{v1 → src/v1}/client/worker/worker.d.ts +1 -1
- package/{v1 → src/v1}/client/worker/worker.js +1 -1
- package/{v1 → src/v1}/conditions/transformer.d.ts +1 -1
- package/{v1 → src/v1}/declaration.d.ts +92 -8
- package/{v1 → src/v1}/declaration.js +63 -5
- package/{v1 → src/v1}/examples/__e2e__/harness.d.ts +2 -2
- package/{v1 → src/v1}/examples/__e2e__/harness.js +2 -2
- package/{v1 → src/v1}/examples/affinity/affinity-workers.js +1 -1
- package/{v1 → src/v1}/examples/cancellation/cancellation-workflow.js +1 -1
- package/{v1 → src/v1}/examples/cancellation/run.js +1 -1
- package/{v1 → src/v1}/examples/cancellations/run.js +1 -1
- package/{v1 → src/v1}/examples/cancellations/workflow.js +1 -1
- package/{v1 → src/v1}/examples/concurrency-rr/workflow.js +1 -1
- package/{v1 → src/v1}/examples/concurrency_cancel_in_progress/workflow.d.ts +1 -1
- package/{v1 → src/v1}/examples/concurrency_cancel_in_progress/workflow.js +2 -2
- package/{v1 → src/v1}/examples/concurrency_cancel_newest/workflow.d.ts +1 -1
- package/{v1 → src/v1}/examples/concurrency_cancel_newest/workflow.js +2 -2
- package/src/v1/examples/concurrency_limit_rr/workflow.d.ts +12 -0
- package/{v1 → src/v1}/examples/concurrency_limit_rr/workflow.js +1 -1
- package/{v1 → src/v1}/examples/concurrency_multiple_keys/workflow.d.ts +1 -1
- package/{v1 → src/v1}/examples/concurrency_multiple_keys/workflow.js +1 -1
- package/{v1 → src/v1}/examples/concurrency_workflow_level/workflow.d.ts +1 -1
- package/{v1 → src/v1}/examples/concurrency_workflow_level/workflow.js +1 -1
- package/{v1 → src/v1}/examples/conditions/complex-workflow.js +2 -2
- package/{v1 → src/v1}/examples/conditions/workflow.js +2 -2
- package/{v1 → src/v1}/examples/dag/interface-workflow.d.ts +2 -2
- package/{v1 → src/v1}/examples/dag_match_condition/complex-workflow.js +2 -2
- package/{v1 → src/v1}/examples/dag_match_condition/workflow.js +2 -2
- package/{v1 → src/v1}/examples/deep/workflow.js +1 -1
- package/{v1 → src/v1}/examples/durable/workflow.js +1 -1
- package/{v1/examples/durable_event → src/v1/examples/durable-event}/workflow.js +1 -1
- package/{v1 → src/v1}/examples/durable-sleep/workflow.js +1 -1
- package/{v1/examples/durable-event → src/v1/examples/durable_event}/workflow.js +1 -1
- package/{v1 → src/v1}/examples/durable_sleep/workflow.js +1 -1
- package/{v1 → src/v1}/examples/hatchet-client.d.ts +1 -1
- package/{v1 → src/v1}/examples/hatchet-client.js +1 -1
- package/{v1 → src/v1}/examples/landing_page/durable-excution.js +1 -1
- package/{v1 → src/v1}/examples/landing_page/flow-control.js +1 -1
- package/src/v1/examples/legacy/workflow.d.ts +2 -0
- package/{v1/examples/logging → src/v1/examples/logger}/byo-logger.js +1 -1
- package/src/v1/examples/logger/workflow.d.ts +2 -0
- package/{legacy/examples → src/v1/examples/logging}/byo-logger.js +1 -1
- package/{v1 → src/v1}/examples/middleware/client.d.ts +1 -1
- package/{v1 → src/v1}/examples/middleware/client.js +1 -1
- package/{v1 → src/v1}/examples/middleware/recipes.js +1 -1
- package/{v1 → src/v1}/examples/migration-guides/hatchet-client.d.ts +1 -1
- package/{v1 → src/v1}/examples/migration-guides/hatchet-client.js +1 -1
- package/{v1 → src/v1}/examples/multiple_wf_concurrency/workflow.d.ts +1 -1
- package/{v1 → src/v1}/examples/multiple_wf_concurrency/workflow.js +1 -1
- package/{v1 → src/v1}/examples/non_retryable/workflow.js +1 -1
- package/{v1 → src/v1}/examples/priority/run.js +1 -1
- package/src/v1/examples/priority/workflow.d.ts +8 -0
- package/{v1 → src/v1}/examples/priority/workflow.js +1 -1
- package/{v1 → src/v1}/examples/quickstart/hatchet-client.d.ts +1 -1
- package/{v1 → src/v1}/examples/quickstart/hatchet-client.js +1 -1
- package/{v1 → src/v1}/examples/rate_limit/workflow.js +1 -1
- package/{v1 → src/v1}/examples/run_details/workflow.js +1 -1
- package/src/v1/examples/runtime_affinity/workflow.d.ts +3 -0
- package/src/v1/examples/runtime_affinity/workflow.js +19 -0
- package/src/v1/examples/simple/e2e-workflows.d.ts +14 -0
- package/{v1 → src/v1}/examples/simple/replay-cancel.js +1 -1
- package/src/v1/examples/sticky/workflow.d.ts +5 -0
- package/{v1 → src/v1}/examples/sticky/workflow.js +1 -1
- package/{v1 → src/v1}/examples/timeout/workflow.js +1 -1
- package/src/v1/examples/timeouts/worker.d.ts +1 -0
- package/{v1 → src/v1}/examples/timeouts/workflow.js +1 -1
- package/{v1 → src/v1}/examples/with_timeouts/workflow.js +1 -1
- package/{v1 → src/v1}/task.d.ts +1 -1
- package/{v1 → src/v1}/task.js +1 -1
- package/{v1 → src/v1}/types.d.ts +1 -1
- package/src/version.d.ts +1 -0
- package/{version.js → src/version.js} +1 -1
- package/{workflow.d.ts → src/workflow.d.ts} +1 -1
- package/{workflow.js → src/workflow.js} +1 -1
- package/clients/hatchet-client/index.d.ts +0 -3
- package/sdk.d.ts +0 -2
- package/v1/client/features/ratelimits.d.ts +0 -20
- package/v1/client/features/webhooks.d.ts +0 -28
- package/v1/client/features/workers.d.ts +0 -14
- package/v1/examples/concurrency_limit_rr/workflow.d.ts +0 -12
- package/v1/examples/legacy/workflow.d.ts +0 -2
- package/v1/examples/logger/workflow.d.ts +0 -2
- package/v1/examples/priority/workflow.d.ts +0 -8
- package/v1/examples/simple/e2e-workflows.d.ts +0 -14
- package/v1/examples/sticky/workflow.d.ts +0 -5
- package/version.d.ts +0 -1
- package/{clients/dispatcher/heartbeat/heartbeat-worker.d.ts → docs/generate.d.ts} +0 -0
- package/{clients → src/clients}/admin/index.d.ts +0 -0
- package/{clients → src/clients}/admin/index.js +0 -0
- package/{legacy/examples/affinity-workers.d.ts → src/clients/dispatcher/heartbeat/heartbeat-worker.d.ts} +0 -0
- package/{clients → src/clients}/hatchet-client/client-config.js +0 -0
- package/{clients → src/clients}/rest/api.d.ts +0 -0
- package/{clients → src/clients}/rest/api.js +0 -0
- package/{clients → src/clients}/rest/generated/Api.d.ts +0 -0
- package/{clients → src/clients}/rest/generated/Api.js +0 -0
- package/{clients → src/clients}/rest/generated/data-contracts.d.ts +0 -0
- package/{clients → src/clients}/rest/generated/data-contracts.js +0 -0
- package/{clients → src/clients}/rest/generated/http-client.d.ts +0 -0
- package/{clients → src/clients}/rest/generated/http-client.js +0 -0
- package/{clients → src/clients}/rest/index.d.ts +0 -0
- package/{clients → src/clients}/rest/index.js +0 -0
- package/{v1/examples/affinity → src/legacy/examples}/affinity-workers.d.ts +0 -0
- package/{legacy → src/legacy}/examples/bulk-fanout-trigger.d.ts +0 -0
- package/{legacy → src/legacy}/examples/bulk-fanout-trigger.js +0 -0
- package/{legacy → src/legacy}/examples/bulk-fanout-worker.d.ts +0 -0
- package/{legacy → src/legacy}/examples/bulk-fanout-worker.js +0 -0
- package/{legacy → src/legacy}/examples/bulk-trigger.d.ts +0 -0
- package/{legacy → src/legacy}/examples/bulk-trigger.js +0 -0
- package/{legacy → src/legacy}/examples/byo-logger.d.ts +0 -0
- package/{v1/examples/logger → src/legacy/examples}/byo-logger.js +0 -0
- package/{legacy → src/legacy}/examples/concurrency/cancel-in-progress/concurrency-event.d.ts +0 -0
- package/{legacy → src/legacy}/examples/concurrency/cancel-in-progress/concurrency-event.js +0 -0
- package/{legacy → src/legacy}/examples/concurrency/cancel-in-progress/concurrency-worker.d.ts +0 -0
- package/{legacy → src/legacy}/examples/concurrency/cancel-in-progress/concurrency-worker.js +0 -0
- package/{legacy → src/legacy}/examples/concurrency/group-round-robin/concurrency-event.d.ts +0 -0
- package/{legacy → src/legacy}/examples/concurrency/group-round-robin/concurrency-event.js +0 -0
- package/{legacy → src/legacy}/examples/concurrency/group-round-robin/concurrency-worker-expression.d.ts +0 -0
- package/{legacy → src/legacy}/examples/concurrency/group-round-robin/concurrency-worker-expression.js +0 -0
- package/{legacy → src/legacy}/examples/concurrency/group-round-robin/concurrency-worker-key-fn.d.ts +0 -0
- package/{legacy → src/legacy}/examples/concurrency/group-round-robin/concurrency-worker-key-fn.js +0 -0
- package/{legacy → src/legacy}/examples/crons/cron-worker.d.ts +0 -0
- package/{legacy → src/legacy}/examples/crons/cron-worker.js +0 -0
- package/{legacy → src/legacy}/examples/crons/programatic-crons.d.ts +0 -0
- package/{legacy → src/legacy}/examples/crons/programatic-crons.js +0 -0
- package/{legacy → src/legacy}/examples/dag-worker.d.ts +0 -0
- package/{legacy → src/legacy}/examples/dag-worker.js +0 -0
- package/{legacy → src/legacy}/examples/example-event-with-results.d.ts +0 -0
- package/{legacy → src/legacy}/examples/example-event-with-results.js +0 -0
- package/{legacy → src/legacy}/examples/example-event.d.ts +0 -0
- package/{legacy → src/legacy}/examples/example-event.js +0 -0
- package/{legacy → src/legacy}/examples/fanout-worker.d.ts +0 -0
- package/{legacy → src/legacy}/examples/fanout-worker.js +0 -0
- package/{legacy → src/legacy}/examples/logger.d.ts +0 -0
- package/{legacy → src/legacy}/examples/logger.js +0 -0
- package/{legacy → src/legacy}/examples/manual-trigger.d.ts +0 -0
- package/{legacy → src/legacy}/examples/manual-trigger.js +0 -0
- package/{legacy → src/legacy}/examples/multi-workflow.d.ts +0 -0
- package/{legacy → src/legacy}/examples/multi-workflow.js +0 -0
- package/{legacy → src/legacy}/examples/namespaced-worker.d.ts +0 -0
- package/{legacy → src/legacy}/examples/namespaced-worker.js +0 -0
- package/{legacy → src/legacy}/examples/on-failure.d.ts +0 -0
- package/{legacy → src/legacy}/examples/on-failure.js +0 -0
- package/{legacy → src/legacy}/examples/rate-limit/events.d.ts +0 -0
- package/{legacy → src/legacy}/examples/rate-limit/events.js +0 -0
- package/{legacy → src/legacy}/examples/rate-limit/worker.d.ts +0 -0
- package/{legacy → src/legacy}/examples/rate-limit/worker.js +0 -0
- package/{legacy → src/legacy}/examples/retries-with-backoff.d.ts +0 -0
- package/{legacy → src/legacy}/examples/retries-with-backoff.js +0 -0
- package/{legacy → src/legacy}/examples/retries-worker.d.ts +0 -0
- package/{legacy → src/legacy}/examples/retries-worker.js +0 -0
- package/{legacy → src/legacy}/examples/scheduled-runs/programatic-schedules.d.ts +0 -0
- package/{legacy → src/legacy}/examples/scheduled-runs/programatic-schedules.js +0 -0
- package/{legacy → src/legacy}/examples/simple-worker.d.ts +0 -0
- package/{legacy → src/legacy}/examples/simple-worker.js +0 -0
- package/{legacy → src/legacy}/examples/sticky-trigger.d.ts +0 -0
- package/{legacy → src/legacy}/examples/sticky-trigger.js +0 -0
- package/{legacy → src/legacy}/examples/sticky-worker-with-check.d.ts +0 -0
- package/{legacy → src/legacy}/examples/sticky-worker-with-check.js +0 -0
- package/{legacy → src/legacy}/examples/sticky-worker.d.ts +0 -0
- package/{legacy → src/legacy}/examples/sticky-worker.js +0 -0
- package/{legacy → src/legacy}/examples/stream-by-additional-meta.d.ts +0 -0
- package/{legacy → src/legacy}/examples/stream-by-additional-meta.js +0 -0
- package/{legacy → src/legacy}/step.d.ts +12 -12
- package/{legacy → src/legacy}/workflow.d.ts +36 -36
- /package/{legacy → src/legacy}/workflow.js +0 -0
- /package/{protoc → src/protoc}/dispatcher/dispatcher.d.ts +0 -0
- /package/{protoc → src/protoc}/dispatcher/dispatcher.js +0 -0
- /package/{protoc → src/protoc}/dispatcher/index.d.ts +0 -0
- /package/{protoc → src/protoc}/dispatcher/index.js +0 -0
- /package/{protoc → src/protoc}/events/events.d.ts +0 -0
- /package/{protoc → src/protoc}/events/events.js +0 -0
- /package/{protoc → src/protoc}/events/index.d.ts +0 -0
- /package/{protoc → src/protoc}/events/index.js +0 -0
- /package/{protoc → src/protoc}/google/protobuf/timestamp.d.ts +0 -0
- /package/{protoc → src/protoc}/google/protobuf/timestamp.js +0 -0
- /package/{protoc → src/protoc}/google/protobuf/wrappers.d.ts +0 -0
- /package/{protoc → src/protoc}/google/protobuf/wrappers.js +0 -0
- /package/{protoc → src/protoc}/v1/dispatcher.d.ts +0 -0
- /package/{protoc → src/protoc}/v1/dispatcher.js +0 -0
- /package/{protoc → src/protoc}/v1/shared/condition.d.ts +0 -0
- /package/{protoc → src/protoc}/v1/shared/condition.js +0 -0
- /package/{protoc → src/protoc}/workflows/index.d.ts +0 -0
- /package/{protoc → src/protoc}/workflows/index.js +0 -0
- /package/{protoc → src/protoc}/workflows/v1-admin.d.ts +0 -0
- /package/{protoc → src/protoc}/workflows/v1-admin.js +0 -0
- /package/{step.d.ts → src/step.d.ts} +0 -0
- /package/{step.js → src/step.js} +0 -0
- /package/{util → src/util}/abort-error.d.ts +0 -0
- /package/{util → src/util}/abort-error.js +0 -0
- /package/{util → src/util}/apply-namespace.d.ts +0 -0
- /package/{util → src/util}/apply-namespace.js +0 -0
- /package/{util → src/util}/batch.d.ts +0 -0
- /package/{util → src/util}/batch.js +0 -0
- /package/{util → src/util}/config-loader/index.d.ts +0 -0
- /package/{util → src/util}/config-loader/index.js +0 -0
- /package/{util → src/util}/config-loader/token.d.ts +0 -0
- /package/{util → src/util}/config-loader/token.js +0 -0
- /package/{util → src/util}/errors/hatchet-error.d.ts +0 -0
- /package/{util → src/util}/errors/hatchet-error.js +0 -0
- /package/{util → src/util}/grpc-helpers.js +0 -0
- /package/{util → src/util}/hatchet-promise/hatchet-promise.d.ts +0 -0
- /package/{util → src/util}/hatchet-promise/hatchet-promise.js +0 -0
- /package/{util → src/util}/logger/index.d.ts +0 -0
- /package/{util → src/util}/logger/index.js +0 -0
- /package/{util → src/util}/logger/logger.js +0 -0
- /package/{util → src/util}/logger/task-run-log.d.ts +0 -0
- /package/{util → src/util}/logger/task-run-log.js +0 -0
- /package/{util → src/util}/parse.d.ts +0 -0
- /package/{util → src/util}/parse.js +0 -0
- /package/{util → src/util}/retrier.d.ts +0 -0
- /package/{util → src/util}/retrier.js +0 -0
- /package/{util → src/util}/sleep.d.ts +0 -0
- /package/{util → src/util}/sleep.js +0 -0
- /package/{util → src/util}/thread-helper.d.ts +0 -0
- /package/{util → src/util}/thread-helper.js +0 -0
- /package/{util → src/util}/uuid.d.ts +0 -0
- /package/{util → src/util}/uuid.js +0 -0
- /package/{util → src/util}/workflow-run-ref.js +0 -0
- /package/{v1 → src/v1}/client/client.interface.js +0 -0
- /package/{v1 → src/v1}/client/duration.d.ts +0 -0
- /package/{v1 → src/v1}/client/duration.js +0 -0
- /package/{v1 → src/v1}/client/features/index.d.ts +0 -0
- /package/{v1 → src/v1}/client/features/index.js +0 -0
- /package/{v1 → src/v1}/client/features/tenant.js +0 -0
- /package/{v1 → src/v1}/client/worker/deprecated/deprecation.js +0 -0
- /package/{v1 → src/v1}/client/worker/deprecated/index.d.ts +0 -0
- /package/{v1 → src/v1}/client/worker/deprecated/index.js +0 -0
- /package/{v1 → src/v1}/client/worker/deprecated/legacy-v1-worker.js +0 -0
- /package/{v1 → src/v1}/client/worker/deprecated/legacy-worker.d.ts +0 -0
- /package/{v1 → src/v1}/client/worker/deprecated/legacy-worker.js +0 -0
- /package/{v1 → src/v1}/client/worker/health-server.js +0 -0
- /package/{v1 → src/v1}/client/worker/slot-utils.d.ts +0 -0
- /package/{v1 → src/v1}/client/worker/slot-utils.js +0 -0
- /package/{v1 → src/v1}/conditions/base.d.ts +0 -0
- /package/{v1 → src/v1}/conditions/base.js +0 -0
- /package/{v1 → src/v1}/conditions/index.d.ts +0 -0
- /package/{v1 → src/v1}/conditions/index.js +0 -0
- /package/{v1 → src/v1}/conditions/parent-condition.d.ts +0 -0
- /package/{v1 → src/v1}/conditions/parent-condition.js +0 -0
- /package/{v1 → src/v1}/conditions/sleep-condition.d.ts +0 -0
- /package/{v1 → src/v1}/conditions/sleep-condition.js +0 -0
- /package/{v1 → src/v1}/conditions/transformer.js +0 -0
- /package/{v1 → src/v1}/conditions/user-event-condition.d.ts +0 -0
- /package/{v1 → src/v1}/conditions/user-event-condition.js +0 -0
- /package/{v1/examples/cancellation/run.d.ts → src/v1/examples/affinity/affinity-workers.d.ts} +0 -0
- /package/{v1 → src/v1}/examples/bulk_fanout/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/bulk_fanout/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/bulk_operations/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/bulk_operations/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/cancellation/cancellation-workflow.d.ts +0 -0
- /package/{v1/examples/cancellations → src/v1/examples/cancellation}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/cancellation/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/cancellation/worker.js +0 -0
- /package/{v1/examples/child_workflows → src/v1/examples/cancellations}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/cancellations/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/cancellations/worker.js +0 -0
- /package/{v1 → src/v1}/examples/cancellations/workflow.d.ts +0 -0
- /package/{v1/examples/concurrency-rr → src/v1/examples/child_workflows}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/child_workflows/run.js +0 -0
- /package/{v1 → src/v1}/examples/child_workflows/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/child_workflows/worker.js +0 -0
- /package/{v1 → src/v1}/examples/child_workflows/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/child_workflows/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/concurrency-rr/load.d.ts +0 -0
- /package/{v1 → src/v1}/examples/concurrency-rr/load.js +0 -0
- /package/{v1/examples/concurrency_limit_rr → src/v1/examples/concurrency-rr}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/concurrency-rr/run.js +0 -0
- /package/{v1 → src/v1}/examples/concurrency-rr/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/concurrency-rr/worker.js +0 -0
- /package/{v1 → src/v1}/examples/concurrency-rr/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/concurrency-types.d.ts +0 -0
- /package/{v1 → src/v1}/examples/concurrency-types.js +0 -0
- /package/{v1 → src/v1}/examples/concurrency_limit_rr/load.d.ts +0 -0
- /package/{v1 → src/v1}/examples/concurrency_limit_rr/load.js +0 -0
- /package/{v1/examples/conditions → src/v1/examples/concurrency_limit_rr}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/concurrency_limit_rr/run.js +0 -0
- /package/{v1 → src/v1}/examples/concurrency_limit_rr/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/concurrency_limit_rr/worker.js +0 -0
- /package/{v1 → src/v1}/examples/conditions/complex-workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/conditions/event.d.ts +0 -0
- /package/{v1 → src/v1}/examples/conditions/event.js +0 -0
- /package/{v1/examples/dag → src/v1/examples/conditions}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/conditions/run.js +0 -0
- /package/{v1 → src/v1}/examples/conditions/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/conditions/worker.js +0 -0
- /package/{v1 → src/v1}/examples/conditions/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/dag/interface-workflow.js +0 -0
- /package/{v1/examples/dag_match_condition → src/v1/examples/dag}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/dag/run.js +0 -0
- /package/{v1 → src/v1}/examples/dag/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/dag/worker.js +0 -0
- /package/{v1 → src/v1}/examples/dag/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/dag/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/dag_match_condition/complex-workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/dag_match_condition/event.d.ts +0 -0
- /package/{v1 → src/v1}/examples/dag_match_condition/event.js +0 -0
- /package/{v1/examples/deep → src/v1/examples/dag_match_condition}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/dag_match_condition/run.js +0 -0
- /package/{v1 → src/v1}/examples/dag_match_condition/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/dag_match_condition/worker.js +0 -0
- /package/{v1 → src/v1}/examples/dag_match_condition/workflow.d.ts +0 -0
- /package/{v1/examples/durable-event → src/v1/examples/deep}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/deep/run.js +0 -0
- /package/{v1 → src/v1}/examples/deep/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/deep/worker.js +0 -0
- /package/{v1 → src/v1}/examples/deep/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable-event/event.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable-event/event.js +0 -0
- /package/{v1/examples/durable-sleep → src/v1/examples/durable-event}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable-event/run.js +0 -0
- /package/{v1 → src/v1}/examples/durable-event/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable-event/worker.js +0 -0
- /package/{v1 → src/v1}/examples/durable-event/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable-sleep/event.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable-sleep/event.js +0 -0
- /package/{v1/examples/durable_event → src/v1/examples/durable-sleep}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable-sleep/run.js +0 -0
- /package/{v1 → src/v1}/examples/durable-sleep/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable-sleep/worker.js +0 -0
- /package/{v1 → src/v1}/examples/durable-sleep/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable_event/event.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable_event/event.js +0 -0
- /package/{v1/examples/durable_sleep → src/v1/examples/durable_event}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable_event/run.js +0 -0
- /package/{v1 → src/v1}/examples/durable_event/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable_event/worker.js +0 -0
- /package/{v1 → src/v1}/examples/durable_event/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable_sleep/event.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable_sleep/event.js +0 -0
- /package/{v1/examples/high-memory → src/v1/examples/durable_sleep}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable_sleep/run.js +0 -0
- /package/{v1 → src/v1}/examples/durable_sleep/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable_sleep/worker.js +0 -0
- /package/{v1 → src/v1}/examples/durable_sleep/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/e2e-worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/e2e-worker.js +0 -0
- /package/{v1 → src/v1}/examples/events/event.d.ts +0 -0
- /package/{v1 → src/v1}/examples/events/event.js +0 -0
- /package/{v1 → src/v1}/examples/events/filter.d.ts +0 -0
- /package/{v1 → src/v1}/examples/events/filter.js +0 -0
- /package/{v1 → src/v1}/examples/events/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/events/worker.js +0 -0
- /package/{v1 → src/v1}/examples/events/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/events/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/high-memory/child-worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/high-memory/child-worker.js +0 -0
- /package/{v1 → src/v1}/examples/high-memory/parent-worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/high-memory/parent-worker.js +0 -0
- /package/{v1/examples/inferred-typing → src/v1/examples/high-memory}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/high-memory/run.js +0 -0
- /package/{v1 → src/v1}/examples/high-memory/workflow-with-child.d.ts +0 -0
- /package/{v1 → src/v1}/examples/high-memory/workflow-with-child.js +0 -0
- /package/{v1/examples/legacy → src/v1/examples/inferred-typing}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/inferred-typing/run.js +0 -0
- /package/{v1 → src/v1}/examples/inferred-typing/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/inferred-typing/worker.js +0 -0
- /package/{v1 → src/v1}/examples/inferred-typing/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/inferred-typing/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/landing_page/durable-excution.d.ts +0 -0
- /package/{v1 → src/v1}/examples/landing_page/event-signaling.d.ts +0 -0
- /package/{v1 → src/v1}/examples/landing_page/event-signaling.js +0 -0
- /package/{v1 → src/v1}/examples/landing_page/flow-control.d.ts +0 -0
- /package/{v1 → src/v1}/examples/landing_page/queues.d.ts +0 -0
- /package/{v1 → src/v1}/examples/landing_page/queues.js +0 -0
- /package/{v1 → src/v1}/examples/landing_page/scheduling.d.ts +0 -0
- /package/{v1 → src/v1}/examples/landing_page/scheduling.js +0 -0
- /package/{v1 → src/v1}/examples/landing_page/task-routing.d.ts +0 -0
- /package/{v1 → src/v1}/examples/landing_page/task-routing.js +0 -0
- /package/{v1/examples/middleware → src/v1/examples/legacy}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/legacy/run.js +0 -0
- /package/{v1 → src/v1}/examples/legacy/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/legacy/worker.js +0 -0
- /package/{v1 → src/v1}/examples/legacy/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/logger/byo-logger.d.ts +0 -0
- /package/{v1 → src/v1}/examples/logger/logger.d.ts +0 -0
- /package/{v1 → src/v1}/examples/logger/logger.js +0 -0
- /package/{v1 → src/v1}/examples/logger/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/logging/byo-logger.d.ts +0 -0
- /package/{v1 → src/v1}/examples/logging/logger.d.ts +0 -0
- /package/{v1 → src/v1}/examples/logging/logger.js +0 -0
- /package/{v1 → src/v1}/examples/middleware/recipes.d.ts +0 -0
- /package/{v1/examples/multiple_wf_concurrency → src/v1/examples/middleware}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/middleware/run.js +0 -0
- /package/{v1 → src/v1}/examples/middleware/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/middleware/worker.js +0 -0
- /package/{v1 → src/v1}/examples/middleware/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/middleware/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/migration-guides/mergent.d.ts +0 -0
- /package/{v1 → src/v1}/examples/migration-guides/mergent.js +0 -0
- /package/{v1/examples/non_retryable → src/v1/examples/multiple_wf_concurrency}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/multiple_wf_concurrency/run.js +0 -0
- /package/{v1 → src/v1}/examples/multiple_wf_concurrency/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/multiple_wf_concurrency/worker.js +0 -0
- /package/{v1/examples/on_failure → src/v1/examples/non_retryable}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/non_retryable/run.js +0 -0
- /package/{v1 → src/v1}/examples/non_retryable/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/non_retryable/worker.js +0 -0
- /package/{v1 → src/v1}/examples/non_retryable/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_cron/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_cron/worker.js +0 -0
- /package/{v1 → src/v1}/examples/on_cron/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_cron/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/on_event/event.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_event/event.js +0 -0
- /package/{v1 → src/v1}/examples/on_event/filter.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_event/filter.js +0 -0
- /package/{v1 → src/v1}/examples/on_event/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_event/worker.js +0 -0
- /package/{v1 → src/v1}/examples/on_event/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_event/workflow.js +0 -0
- /package/{v1/examples/on_success → src/v1/examples/on_failure}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_failure/run.js +0 -0
- /package/{v1 → src/v1}/examples/on_failure/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_failure/worker.js +0 -0
- /package/{v1 → src/v1}/examples/on_failure/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_failure/workflow.js +0 -0
- /package/{v1/examples/priority → src/v1/examples/on_success}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_success/run.js +0 -0
- /package/{v1 → src/v1}/examples/on_success/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_success/worker.js +0 -0
- /package/{v1 → src/v1}/examples/on_success/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_success/workflow.js +0 -0
- /package/{v1/examples/quickstart → src/v1/examples/priority}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/priority/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/priority/worker.js +0 -0
- /package/{v1/examples/retries → src/v1/examples/quickstart}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/quickstart/run.js +0 -0
- /package/{v1 → src/v1}/examples/quickstart/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/quickstart/worker.js +0 -0
- /package/{v1 → src/v1}/examples/quickstart/workflows/first-task.d.ts +0 -0
- /package/{v1 → src/v1}/examples/quickstart/workflows/first-task.js +0 -0
- /package/{v1 → src/v1}/examples/rate_limit/workflow.d.ts +0 -0
- /package/{v1/examples/sticky → src/v1/examples/retries}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/retries/run.js +0 -0
- /package/{v1 → src/v1}/examples/retries/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/retries/worker.js +0 -0
- /package/{v1 → src/v1}/examples/retries/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/retries/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/return_exceptions/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/return_exceptions/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/run_details/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/bulk.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/bulk.js +0 -0
- /package/{v1 → src/v1}/examples/simple/client-run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/client-run.js +0 -0
- /package/{v1 → src/v1}/examples/simple/cron.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/cron.js +0 -0
- /package/{v1 → src/v1}/examples/simple/delay.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/delay.js +0 -0
- /package/{v1 → src/v1}/examples/simple/e2e-workflows.js +0 -0
- /package/{v1 → src/v1}/examples/simple/enqueue.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/enqueue.js +0 -0
- /package/{v1 → src/v1}/examples/simple/replay-cancel.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/run.js +0 -0
- /package/{v1 → src/v1}/examples/simple/schedule.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/schedule.js +0 -0
- /package/{v1 → src/v1}/examples/simple/stub-workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/stub-workflow.js +0 -0
- /package/{v1 → src/v1}/examples/simple/typed-run-methods.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/typed-run-methods.js +0 -0
- /package/{v1 → src/v1}/examples/simple/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/worker.js +0 -0
- /package/{v1 → src/v1}/examples/simple/workflow-with-child.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/workflow-with-child.js +0 -0
- /package/{v1 → src/v1}/examples/simple/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/simple/zod.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/zod.js +0 -0
- /package/{v1/examples/streaming → src/v1/examples/sticky}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/sticky/run.js +0 -0
- /package/{v1 → src/v1}/examples/sticky/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/sticky/worker.js +0 -0
- /package/{v1 → src/v1}/examples/streaming/nextjs-proxy.d.ts +0 -0
- /package/{v1 → src/v1}/examples/streaming/nextjs-proxy.js +0 -0
- /package/{v1/examples/timeout → src/v1/examples/streaming}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/streaming/run.js +0 -0
- /package/{v1 → src/v1}/examples/streaming/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/streaming/worker.js +0 -0
- /package/{v1 → src/v1}/examples/streaming/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/streaming/workflow.js +0 -0
- /package/{v1/examples/timeouts → src/v1/examples/timeout}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/timeout/run.js +0 -0
- /package/{v1 → src/v1}/examples/timeout/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/timeout/worker.js +0 -0
- /package/{v1 → src/v1}/examples/timeout/workflow.d.ts +0 -0
- /package/{v1/examples/timeouts/worker.d.ts → src/v1/examples/timeouts/run.d.ts} +0 -0
- /package/{v1 → src/v1}/examples/timeouts/run.js +0 -0
- /package/{v1 → src/v1}/examples/timeouts/worker.js +0 -0
- /package/{v1 → src/v1}/examples/timeouts/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/webhooks/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/webhooks/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/with_timeouts/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/index.d.ts +0 -0
- /package/{v1 → src/v1}/index.js +0 -0
- /package/{v1 → src/v1}/parent-run-context-vars.d.ts +0 -0
- /package/{v1 → src/v1}/parent-run-context-vars.js +0 -0
- /package/{v1 → src/v1}/slot-types.d.ts +0 -0
- /package/{v1 → src/v1}/slot-types.js +0 -0
- /package/{v1 → src/v1}/types.js +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface Document {
|
|
2
|
+
sourcePath: string;
|
|
3
|
+
readableSourcePath: string;
|
|
4
|
+
mdxOutputPath: string;
|
|
5
|
+
mdxOutputMetaJsPath: string;
|
|
6
|
+
isIndex: boolean;
|
|
7
|
+
directory: string;
|
|
8
|
+
basename: string;
|
|
9
|
+
title: string;
|
|
10
|
+
metaJsEntry: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function documentFromPath(filePath: string): Document;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.documentFromPath = documentFromPath;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const shared_1 = require("./shared");
|
|
9
|
+
const FILENAME_REMAP = {
|
|
10
|
+
'Hatchet-TypeScript-SDK-Reference.mdx': 'client.mdx',
|
|
11
|
+
};
|
|
12
|
+
function remapFilename(filename) {
|
|
13
|
+
var _a;
|
|
14
|
+
const remapped = (_a = FILENAME_REMAP[filename]) !== null && _a !== void 0 ? _a : filename;
|
|
15
|
+
if (remapped.startsWith('client.features.')) {
|
|
16
|
+
const leafName = remapped.replace('client.features.', '');
|
|
17
|
+
return {
|
|
18
|
+
outRelative: 'feature-clients/' + leafName,
|
|
19
|
+
basename: path_1.default.basename(leafName, shared_1.MDX_EXTENSION),
|
|
20
|
+
directory: '/feature-clients',
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
outRelative: remapped,
|
|
25
|
+
basename: path_1.default.basename(remapped, shared_1.MDX_EXTENSION),
|
|
26
|
+
directory: '',
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function toTitle(basename) {
|
|
30
|
+
return basename
|
|
31
|
+
.replace(/[-_.]/g, ' ')
|
|
32
|
+
.replace(/[^0-9a-zA-Z ]+/g, '')
|
|
33
|
+
.trim()
|
|
34
|
+
.replace(/\s+/g, ' ')
|
|
35
|
+
.split(' ')
|
|
36
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
37
|
+
.join(' ');
|
|
38
|
+
}
|
|
39
|
+
function documentFromPath(filePath) {
|
|
40
|
+
const filename = path_1.default.basename(filePath);
|
|
41
|
+
const { outRelative, basename, directory } = remapFilename(filename);
|
|
42
|
+
const title = toTitle(basename);
|
|
43
|
+
const outFull = path_1.default.join(shared_1.FRONTEND_DOCS_RELATIVE_PATH, outRelative);
|
|
44
|
+
const outDir = path_1.default.dirname(outFull);
|
|
45
|
+
const metaJsEntry = ` "${basename}": {
|
|
46
|
+
title: "${title}",
|
|
47
|
+
theme: {
|
|
48
|
+
toc: true,
|
|
49
|
+
},
|
|
50
|
+
},`;
|
|
51
|
+
return {
|
|
52
|
+
directory,
|
|
53
|
+
basename,
|
|
54
|
+
title,
|
|
55
|
+
metaJsEntry,
|
|
56
|
+
sourcePath: filePath,
|
|
57
|
+
readableSourcePath: filename,
|
|
58
|
+
mdxOutputPath: outFull,
|
|
59
|
+
mdxOutputMetaJsPath: path_1.default.join(outDir, '_meta.js'),
|
|
60
|
+
isIndex: basename === 'index' || basename === 'README',
|
|
61
|
+
};
|
|
62
|
+
}
|
package/docs/generate.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const child_process_1 = require("child_process");
|
|
9
|
+
const paths_1 = require("./paths");
|
|
10
|
+
const shared_1 = require("./shared");
|
|
11
|
+
function rmrf(target) {
|
|
12
|
+
if (fs_1.default.existsSync(target)) {
|
|
13
|
+
fs_1.default.rmSync(target, { recursive: true, force: true });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function metaEntry(key, title) {
|
|
17
|
+
return ` "${key}": {
|
|
18
|
+
title: "${title}",
|
|
19
|
+
theme: {
|
|
20
|
+
toc: true,
|
|
21
|
+
},
|
|
22
|
+
},`;
|
|
23
|
+
}
|
|
24
|
+
function generateMetaJs(docs, subDirs) {
|
|
25
|
+
const docEntries = docs.map((d) => d.metaJsEntry);
|
|
26
|
+
const subDirEntries = subDirs.map((dir) => {
|
|
27
|
+
const name = dir.replace(/^\//, '');
|
|
28
|
+
const title = name.replace(/-/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase());
|
|
29
|
+
return metaEntry(name, title);
|
|
30
|
+
});
|
|
31
|
+
const all = [...docEntries, ...subDirEntries].sort((a, b) => {
|
|
32
|
+
const keyA = a.trim().split(':')[0].replace(/"/g, '').toLowerCase();
|
|
33
|
+
const keyB = b.trim().split(':')[0].replace(/"/g, '').toLowerCase();
|
|
34
|
+
return keyA.localeCompare(keyB);
|
|
35
|
+
});
|
|
36
|
+
return `export default {\n${all.join('\n\n')}\n};\n`;
|
|
37
|
+
}
|
|
38
|
+
function updateMetaJs(documents) {
|
|
39
|
+
const metaJsPaths = new Set(documents.map((d) => d.mdxOutputMetaJsPath));
|
|
40
|
+
for (const metaJsPath of metaJsPaths) {
|
|
41
|
+
const relevantDocs = documents.filter((d) => d.mdxOutputMetaJsPath === metaJsPath);
|
|
42
|
+
const thisDir = relevantDocs[0].directory;
|
|
43
|
+
const subDirs = [
|
|
44
|
+
...new Set(documents
|
|
45
|
+
.map((d) => d.directory)
|
|
46
|
+
.filter((dir) => dir !== thisDir && dir.startsWith(thisDir) && dir.split('/').length === thisDir.split('/').filter(Boolean).length + 2)),
|
|
47
|
+
];
|
|
48
|
+
const meta = generateMetaJs(relevantDocs, subDirs);
|
|
49
|
+
fs_1.default.mkdirSync(path_1.default.dirname(metaJsPath), { recursive: true });
|
|
50
|
+
fs_1.default.writeFileSync(metaJsPath, meta, 'utf-8');
|
|
51
|
+
console.log('Wrote', metaJsPath);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function fixBrokenFeatureAnchorLinks(content) {
|
|
55
|
+
return content.replace(/\(client\.features\.([^)\s#]+\.mdx)/g, '(feature-clients/$1');
|
|
56
|
+
}
|
|
57
|
+
function copyDoc(document) {
|
|
58
|
+
const content = fixBrokenFeatureAnchorLinks(fs_1.default.readFileSync(document.sourcePath, 'utf-8'));
|
|
59
|
+
fs_1.default.mkdirSync(path_1.default.dirname(document.mdxOutputPath), { recursive: true });
|
|
60
|
+
fs_1.default.writeFileSync(document.mdxOutputPath, content, 'utf-8');
|
|
61
|
+
console.log('Wrote', document.mdxOutputPath);
|
|
62
|
+
}
|
|
63
|
+
function run() {
|
|
64
|
+
rmrf(shared_1.TMP_GEN_PATH);
|
|
65
|
+
try {
|
|
66
|
+
console.log('Running typedoc...');
|
|
67
|
+
(0, child_process_1.execSync)('npx typedoc', { stdio: 'inherit' });
|
|
68
|
+
const documents = (0, paths_1.crawlDirectory)(shared_1.TMP_GEN_PATH);
|
|
69
|
+
console.log(`Found ${documents.length} documents`);
|
|
70
|
+
for (const doc of documents) {
|
|
71
|
+
copyDoc(doc);
|
|
72
|
+
}
|
|
73
|
+
updateMetaJs(documents);
|
|
74
|
+
console.log('Running prettier on frontend docs...');
|
|
75
|
+
(0, child_process_1.execSync)('pnpm lint:fix', {
|
|
76
|
+
stdio: 'inherit',
|
|
77
|
+
cwd: path_1.default.resolve(process.cwd(), '../../frontend/docs'),
|
|
78
|
+
shell: '/bin/bash',
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
finally {
|
|
82
|
+
rmrf(shared_1.TMP_GEN_PATH);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (require.main === module) {
|
|
86
|
+
run();
|
|
87
|
+
}
|
package/docs/paths.d.ts
ADDED
package/docs/paths.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.crawlDirectory = crawlDirectory;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const doc_types_1 = require("./doc_types");
|
|
10
|
+
function crawlDirectory(directory, onlyInclude = []) {
|
|
11
|
+
return fs_1.default
|
|
12
|
+
.readdirSync(directory, { withFileTypes: true })
|
|
13
|
+
.filter((entry) => entry.isFile() && entry.name.endsWith('.mdx') && entry.name !== 'README.mdx')
|
|
14
|
+
.map((entry) => (0, doc_types_1.documentFromPath)(path_1.default.join(directory, entry.name)))
|
|
15
|
+
.filter((doc) => !onlyInclude.length || onlyInclude.includes(doc.readableSourcePath));
|
|
16
|
+
}
|
package/docs/shared.d.ts
ADDED
package/docs/shared.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MDX_EXTENSION = exports.FRONTEND_DOCS_RELATIVE_PATH = exports.TMP_GEN_PATH = void 0;
|
|
4
|
+
exports.TMP_GEN_PATH = '/tmp/hatchet-typescript/docs/gen';
|
|
5
|
+
exports.FRONTEND_DOCS_RELATIVE_PATH = '../../frontend/docs/pages/sdks/typescript';
|
|
6
|
+
exports.MDX_EXTENSION = '.mdx';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hatchet-dev/typescript-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "Background task orchestration & visibility for developers",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -49,8 +49,9 @@
|
|
|
49
49
|
"ts-jest": "^29.3.1",
|
|
50
50
|
"ts-node": "^10.9.2",
|
|
51
51
|
"ts-proto": "^2.7.0",
|
|
52
|
-
"typedoc": "^0.28.
|
|
52
|
+
"typedoc": "^0.28.17",
|
|
53
53
|
"typedoc-plugin-markdown": "^4.6.0",
|
|
54
|
+
"typedoc-plugin-no-inherit": "^1.6.1",
|
|
54
55
|
"typescript": "^5.8.2"
|
|
55
56
|
},
|
|
56
57
|
"dependencies": {
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
"prepublish": "cp package.json dist/package.json; cp README.md dist/; cp -r scripts dist/",
|
|
92
93
|
"publish:ci": "rm -rf ./dist && pnpm run dump-version && pnpm run tsc:build && pnpm run prepublish && cd dist && pnpm publish --access public --no-git-checks",
|
|
93
94
|
"publish:ci:alpha": "rm -rf ./dist && pnpm run dump-version && pnpm run tsc:build && pnpm run prepublish && cd dist && pnpm publish --access public --no-git-checks --tag alpha",
|
|
94
|
-
"generate-docs": "
|
|
95
|
+
"generate-docs": "ts-node docs/generate.ts",
|
|
95
96
|
"exec": "npx dotenv -- ts-node -r tsconfig-paths/register --project tsconfig.json"
|
|
96
97
|
}
|
|
97
98
|
}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { Channel, ClientFactory } from 'nice-grpc';
|
|
2
|
-
import { CreateWorkflowVersionOpts, RateLimitDuration, WorkflowServiceClient } from '
|
|
3
|
-
import { ClientConfig } from '
|
|
4
|
-
import { Logger } from '
|
|
5
|
-
import WorkflowRunRef from '
|
|
6
|
-
import { AdminServiceClient, CreateWorkflowVersionRequest } from '
|
|
7
|
-
import { Priority, RunsClient } from '
|
|
2
|
+
import { CreateWorkflowVersionOpts, RateLimitDuration, WorkerLabelComparator, WorkflowServiceClient } from '../../../protoc/workflows';
|
|
3
|
+
import { ClientConfig } from '../../../clients/hatchet-client/client-config';
|
|
4
|
+
import { Logger } from '../../../util/logger';
|
|
5
|
+
import WorkflowRunRef from '../../../util/workflow-run-ref';
|
|
6
|
+
import { AdminServiceClient, CreateWorkflowVersionRequest } from '../../../protoc/v1/workflows';
|
|
7
|
+
import { Priority, RunsClient } from '../../../v1';
|
|
8
8
|
import { Api } from '../rest';
|
|
9
9
|
import { WebhookWorkerCreateRequest, WorkflowRunStatus, WorkflowRunStatusList } from '../rest/generated/data-contracts';
|
|
10
10
|
import { RunListenerClient } from '../listeners/run-listener/child-listener-client';
|
|
11
|
+
type DesiredWorkerLabelOpt = {
|
|
12
|
+
value: string | number;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
weight?: number;
|
|
15
|
+
comparator?: WorkerLabelComparator;
|
|
16
|
+
};
|
|
11
17
|
type WorkflowMetricsQuery = {
|
|
12
18
|
workflowId?: string;
|
|
13
19
|
workflowName?: string;
|
|
@@ -48,19 +54,19 @@ export declare class AdminClient {
|
|
|
48
54
|
/**
|
|
49
55
|
* @deprecated use putWorkflow instead
|
|
50
56
|
*/
|
|
51
|
-
put_workflow(opts: CreateWorkflowVersionOpts): Promise<import("
|
|
57
|
+
put_workflow(opts: CreateWorkflowVersionOpts): Promise<import("../../../protoc/workflows").WorkflowVersion>;
|
|
52
58
|
/**
|
|
53
59
|
* Creates a new workflow or updates an existing workflow. If the workflow already exists, Hatchet will automatically
|
|
54
60
|
* determine if the workflow definition has changed and create a new version if necessary.
|
|
55
61
|
* @param workflow a workflow definition to create
|
|
56
62
|
*/
|
|
57
|
-
putWorkflow(workflow: CreateWorkflowVersionOpts): Promise<import("
|
|
63
|
+
putWorkflow(workflow: CreateWorkflowVersionOpts): Promise<import("../../../protoc/workflows").WorkflowVersion>;
|
|
58
64
|
/**
|
|
59
65
|
* Creates a new workflow or updates an existing workflow. If the workflow already exists, Hatchet will automatically
|
|
60
66
|
* determine if the workflow definition has changed and create a new version if necessary.
|
|
61
67
|
* @param workflow a workflow definition to create
|
|
62
68
|
*/
|
|
63
|
-
putWorkflowV1(workflow: CreateWorkflowVersionRequest): Promise<import("
|
|
69
|
+
putWorkflowV1(workflow: CreateWorkflowVersionRequest): Promise<import("../../../protoc/v1/workflows").CreateWorkflowVersionResponse>;
|
|
64
70
|
/**
|
|
65
71
|
* @deprecated use hatchet.ratelimits.upsert instead
|
|
66
72
|
*/
|
|
@@ -114,6 +120,7 @@ export declare class AdminClient {
|
|
|
114
120
|
additionalMetadata?: Record<string, string> | undefined;
|
|
115
121
|
desiredWorkerId?: string | undefined;
|
|
116
122
|
priority?: Priority;
|
|
123
|
+
desiredWorkerLabels?: Record<string, DesiredWorkerLabelOpt>;
|
|
117
124
|
}): WorkflowRunRef<P>;
|
|
118
125
|
/**
|
|
119
126
|
* Run multiple workflows runs with the given input and options. This will create new workflow runs and return their IDs.
|
|
@@ -142,6 +149,7 @@ export declare class AdminClient {
|
|
|
142
149
|
additionalMetadata?: Record<string, string> | undefined;
|
|
143
150
|
desiredWorkerId?: string | undefined;
|
|
144
151
|
priority?: Priority;
|
|
152
|
+
desiredWorkerLabels?: Record<string, DesiredWorkerLabelOpt>;
|
|
145
153
|
};
|
|
146
154
|
}>): Promise<WorkflowRunRef<P>[]>;
|
|
147
155
|
/**
|
|
@@ -24,12 +24,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.AdminClient = void 0;
|
|
27
|
-
const workflows_1 = require("
|
|
28
|
-
const hatchet_error_1 = __importDefault(require("
|
|
29
|
-
const retrier_1 = require("
|
|
30
|
-
const workflow_run_ref_1 = __importDefault(require("
|
|
31
|
-
const workflows_2 = require("
|
|
32
|
-
const apply_namespace_1 = require("
|
|
27
|
+
const workflows_1 = require("../../../protoc/workflows");
|
|
28
|
+
const hatchet_error_1 = __importDefault(require("../../../util/errors/hatchet-error"));
|
|
29
|
+
const retrier_1 = require("../../../util/retrier");
|
|
30
|
+
const workflow_run_ref_1 = __importDefault(require("../../../util/workflow-run-ref"));
|
|
31
|
+
const workflows_2 = require("../../../protoc/v1/workflows");
|
|
32
|
+
const apply_namespace_1 = require("../../../util/apply-namespace");
|
|
33
|
+
function convertDesiredWorkerLabels(labels) {
|
|
34
|
+
return Object.fromEntries(Object.entries(labels).map(([key, label]) => [
|
|
35
|
+
key,
|
|
36
|
+
{
|
|
37
|
+
strValue: typeof label.value === 'string' ? label.value : undefined,
|
|
38
|
+
intValue: typeof label.value === 'number' ? label.value : undefined,
|
|
39
|
+
required: label.required,
|
|
40
|
+
weight: label.weight,
|
|
41
|
+
comparator: label.comparator,
|
|
42
|
+
},
|
|
43
|
+
]));
|
|
44
|
+
}
|
|
33
45
|
class AdminClient {
|
|
34
46
|
constructor(config, channel, factory, api, tenantId, listenerClient, workflows) {
|
|
35
47
|
this.config = config;
|
|
@@ -132,10 +144,12 @@ class AdminClient {
|
|
|
132
144
|
try {
|
|
133
145
|
const inputStr = JSON.stringify(input);
|
|
134
146
|
const opts = options !== null && options !== void 0 ? options : {};
|
|
135
|
-
const { additionalMetadata, parentStepRunId, parentTaskRunExternalId } = opts, rest = __rest(opts, ["additionalMetadata", "parentStepRunId", "parentTaskRunExternalId"]);
|
|
147
|
+
const { additionalMetadata, parentStepRunId, parentTaskRunExternalId, desiredWorkerLabels } = opts, rest = __rest(opts, ["additionalMetadata", "parentStepRunId", "parentTaskRunExternalId", "desiredWorkerLabels"]);
|
|
136
148
|
const resp = this.client.triggerWorkflow(Object.assign(Object.assign({ name: computedName, input: inputStr }, rest), {
|
|
137
149
|
// API expects `parentTaskRunExternalId`; accept the old name as an alias.
|
|
138
|
-
parentTaskRunExternalId: parentTaskRunExternalId !== null && parentTaskRunExternalId !== void 0 ? parentTaskRunExternalId : parentStepRunId, additionalMetadata: additionalMetadata ? JSON.stringify(additionalMetadata) : undefined, priority: opts.priority
|
|
150
|
+
parentTaskRunExternalId: parentTaskRunExternalId !== null && parentTaskRunExternalId !== void 0 ? parentTaskRunExternalId : parentStepRunId, additionalMetadata: additionalMetadata ? JSON.stringify(additionalMetadata) : undefined, priority: opts.priority, desiredWorkerLabels: desiredWorkerLabels
|
|
151
|
+
? convertDesiredWorkerLabels(desiredWorkerLabels)
|
|
152
|
+
: {} }));
|
|
139
153
|
return new workflow_run_ref_1.default(resp, this.listenerClient, this.workflows, options === null || options === void 0 ? void 0 : options.parentId);
|
|
140
154
|
}
|
|
141
155
|
catch (e) {
|
|
@@ -154,8 +168,10 @@ class AdminClient {
|
|
|
154
168
|
const computedName = (0, apply_namespace_1.applyNamespace)(workflowName, this.config.namespace);
|
|
155
169
|
const inputStr = JSON.stringify(input);
|
|
156
170
|
const opts = options !== null && options !== void 0 ? options : {};
|
|
157
|
-
const { additionalMetadata, parentStepRunId, parentTaskRunExternalId } = opts, rest = __rest(opts, ["additionalMetadata", "parentStepRunId", "parentTaskRunExternalId"]);
|
|
158
|
-
return Object.assign(Object.assign({ name: computedName, input: inputStr }, rest), { parentTaskRunExternalId: parentTaskRunExternalId !== null && parentTaskRunExternalId !== void 0 ? parentTaskRunExternalId : parentStepRunId, additionalMetadata: additionalMetadata ? JSON.stringify(additionalMetadata) : undefined
|
|
171
|
+
const { additionalMetadata, parentStepRunId, parentTaskRunExternalId, desiredWorkerLabels } = opts, rest = __rest(opts, ["additionalMetadata", "parentStepRunId", "parentTaskRunExternalId", "desiredWorkerLabels"]);
|
|
172
|
+
return Object.assign(Object.assign({ name: computedName, input: inputStr }, rest), { parentTaskRunExternalId: parentTaskRunExternalId !== null && parentTaskRunExternalId !== void 0 ? parentTaskRunExternalId : parentStepRunId, additionalMetadata: additionalMetadata ? JSON.stringify(additionalMetadata) : undefined, desiredWorkerLabels: desiredWorkerLabels
|
|
173
|
+
? convertDesiredWorkerLabels(desiredWorkerLabels)
|
|
174
|
+
: {} });
|
|
159
175
|
});
|
|
160
176
|
try {
|
|
161
177
|
// Call the bulk trigger workflow method
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DispatcherClient as PbDispatcherClient, AssignedAction } from '
|
|
2
|
-
import { ClientConfig } from '
|
|
3
|
-
import { Logger } from '
|
|
1
|
+
import { DispatcherClient as PbDispatcherClient, AssignedAction } from '../../../protoc/dispatcher';
|
|
2
|
+
import { ClientConfig } from '../../../clients/hatchet-client/client-config';
|
|
3
|
+
import { Logger } from '../../../util/logger';
|
|
4
4
|
import { DispatcherClient } from './dispatcher-client';
|
|
5
5
|
import { Heartbeat } from './heartbeat/heartbeat-controller';
|
|
6
6
|
declare enum ListenStrategy {
|
|
@@ -34,6 +34,6 @@ export declare class ActionListener {
|
|
|
34
34
|
getListenStrategy(): Promise<ListenStrategy>;
|
|
35
35
|
incrementRetries(): Promise<void>;
|
|
36
36
|
getListenClient(): Promise<AsyncIterable<AssignedAction>>;
|
|
37
|
-
unregister(): Promise<import("
|
|
37
|
+
unregister(): Promise<import("../../../protoc/dispatcher").WorkerUnsubscribeResponse>;
|
|
38
38
|
}
|
|
39
39
|
export {};
|
|
@@ -34,11 +34,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
35
|
exports.ActionListener = void 0;
|
|
36
36
|
exports.createActionKey = createActionKey;
|
|
37
|
-
const dispatcher_1 = require("
|
|
37
|
+
const dispatcher_1 = require("../../../protoc/dispatcher");
|
|
38
38
|
const nice_grpc_1 = require("nice-grpc");
|
|
39
39
|
const abort_controller_x_1 = require("abort-controller-x");
|
|
40
|
-
const sleep_1 = __importDefault(require("
|
|
41
|
-
const hatchet_error_1 = __importDefault(require("
|
|
40
|
+
const sleep_1 = __importDefault(require("../../../util/sleep"));
|
|
41
|
+
const hatchet_error_1 = __importDefault(require("../../../util/errors/hatchet-error"));
|
|
42
42
|
const heartbeat_controller_1 = require("./heartbeat/heartbeat-controller");
|
|
43
43
|
const DEFAULT_ACTION_LISTENER_RETRY_INTERVAL = 5000; // milliseconds
|
|
44
44
|
const DEFAULT_ACTION_LISTENER_RETRY_COUNT = 20;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Channel, ClientFactory } from 'nice-grpc';
|
|
2
|
-
import { DispatcherClient as PbDispatcherClient, StepActionEvent, GroupKeyActionEvent, OverridesData, DeepPartial, WorkerLabels as PbWorkerAffinityConfig, RuntimeInfo } from '
|
|
3
|
-
import { ClientConfig } from '
|
|
4
|
-
import { Logger } from '
|
|
5
|
-
import { SlotConfig } from '
|
|
2
|
+
import { DispatcherClient as PbDispatcherClient, StepActionEvent, GroupKeyActionEvent, OverridesData, DeepPartial, WorkerLabels as PbWorkerAffinityConfig, RuntimeInfo } from '../../../protoc/dispatcher';
|
|
3
|
+
import { ClientConfig } from '../../../clients/hatchet-client/client-config';
|
|
4
|
+
import { Logger } from '../../../util/logger';
|
|
5
|
+
import { SlotConfig } from '../../../v1/slot-types';
|
|
6
6
|
import { ActionListener } from './action-listener';
|
|
7
7
|
export type WorkerLabels = Record<string, string | number | undefined>;
|
|
8
8
|
interface GetActionListenerOptions {
|
|
@@ -36,11 +36,11 @@ export declare class DispatcherClient {
|
|
|
36
36
|
* Throws a gRPC error with code UNIMPLEMENTED on older engines.
|
|
37
37
|
*/
|
|
38
38
|
getVersion(): Promise<string>;
|
|
39
|
-
sendStepActionEvent(in_: StepActionEventInput): Promise<import("
|
|
40
|
-
sendGroupKeyActionEvent(in_: GroupKeyActionEvent): Promise<import("
|
|
41
|
-
putOverridesData(in_: DeepPartial<OverridesData>): Promise<void | import("
|
|
42
|
-
refreshTimeout(incrementTimeoutBy: string, taskRunExternalId: string): Promise<import("
|
|
43
|
-
upsertWorkerLabels(workerId: string, labels: WorkerLabels): Promise<import("
|
|
39
|
+
sendStepActionEvent(in_: StepActionEventInput): Promise<import("../../../protoc/dispatcher").ActionEventResponse>;
|
|
40
|
+
sendGroupKeyActionEvent(in_: GroupKeyActionEvent): Promise<import("../../../protoc/dispatcher").ActionEventResponse>;
|
|
41
|
+
putOverridesData(in_: DeepPartial<OverridesData>): Promise<void | import("../../../protoc/dispatcher").OverridesDataResponse>;
|
|
42
|
+
refreshTimeout(incrementTimeoutBy: string, taskRunExternalId: string): Promise<import("../../../protoc/dispatcher").RefreshTimeoutResponse>;
|
|
43
|
+
upsertWorkerLabels(workerId: string, labels: WorkerLabels): Promise<import("../../../protoc/dispatcher").UpsertWorkerLabelsResponse>;
|
|
44
44
|
}
|
|
45
45
|
export declare function mapLabels(in_: WorkerLabels): Record<string, PbWorkerAffinityConfig>;
|
|
46
46
|
export {};
|
|
@@ -25,11 +25,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.DispatcherClient = void 0;
|
|
27
27
|
exports.mapLabels = mapLabels;
|
|
28
|
-
const dispatcher_1 = require("
|
|
29
|
-
const hatchet_error_1 = __importDefault(require("
|
|
30
|
-
const retrier_1 = require("
|
|
31
|
-
const version_1 = require("
|
|
32
|
-
const slot_types_1 = require("
|
|
28
|
+
const dispatcher_1 = require("../../../protoc/dispatcher");
|
|
29
|
+
const hatchet_error_1 = __importDefault(require("../../../util/errors/hatchet-error"));
|
|
30
|
+
const retrier_1 = require("../../../util/retrier");
|
|
31
|
+
const version_1 = require("../../../version");
|
|
32
|
+
const slot_types_1 = require("../../../v1/slot-types");
|
|
33
33
|
const action_listener_1 = require("./action-listener");
|
|
34
34
|
class DispatcherClient {
|
|
35
35
|
constructor(config, channel, factory) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Logger } from '
|
|
2
|
-
import { DispatcherClient as PbDispatcherClient } from '
|
|
1
|
+
import { Logger } from '../../../../util/logger';
|
|
2
|
+
import { DispatcherClient as PbDispatcherClient } from '../../../../protoc/dispatcher';
|
|
3
3
|
import { Worker } from 'worker_threads';
|
|
4
4
|
import { ClientConfig } from '../../hatchet-client';
|
|
5
5
|
import { DispatcherClient } from '../dispatcher-client';
|
|
@@ -25,7 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Heartbeat = exports.STOP_HEARTBEAT = void 0;
|
|
27
27
|
const path_1 = __importDefault(require("path"));
|
|
28
|
-
const thread_helper_1 = require("
|
|
28
|
+
const thread_helper_1 = require("../../../../util/thread-helper");
|
|
29
29
|
exports.STOP_HEARTBEAT = 'stop';
|
|
30
30
|
class Heartbeat {
|
|
31
31
|
constructor(client, workerId) {
|
|
@@ -10,10 +10,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const worker_threads_1 = require("worker_threads");
|
|
13
|
-
const hatchet_client_1 = require("
|
|
14
|
-
const config_loader_1 = require("
|
|
13
|
+
const hatchet_client_1 = require("../../../../clients/hatchet-client");
|
|
14
|
+
const config_loader_1 = require("../../../../util/config-loader");
|
|
15
15
|
const nice_grpc_1 = require("nice-grpc");
|
|
16
|
-
const grpc_helpers_1 = require("
|
|
16
|
+
const grpc_helpers_1 = require("../../../../util/grpc-helpers");
|
|
17
17
|
const dispatcher_client_1 = require("../dispatcher-client");
|
|
18
18
|
const heartbeat_controller_1 = require("./heartbeat-controller");
|
|
19
19
|
const HEARTBEAT_INTERVAL = 4000;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Channel, ClientFactory } from 'nice-grpc';
|
|
2
|
-
import { EventsServiceClient } from '
|
|
3
|
-
import { ClientConfig } from '
|
|
4
|
-
import { Logger } from '
|
|
5
|
-
import { retrier } from '
|
|
6
|
-
import { HatchetClient } from '
|
|
2
|
+
import { EventsServiceClient } from '../../../protoc/events/events';
|
|
3
|
+
import { ClientConfig } from '../../../clients/hatchet-client/client-config';
|
|
4
|
+
import { Logger } from '../../../util/logger';
|
|
5
|
+
import { retrier } from '../../../util/retrier';
|
|
6
|
+
import { HatchetClient } from '../../../v1';
|
|
7
7
|
export declare enum LogLevel {
|
|
8
8
|
INFO = "INFO",
|
|
9
9
|
WARN = "WARN",
|
|
@@ -29,8 +29,8 @@ export declare class EventClient {
|
|
|
29
29
|
tenantId: string;
|
|
30
30
|
logger: Logger;
|
|
31
31
|
constructor(config: ClientConfig, channel: Channel, factory: ClientFactory, api: HatchetClient['api']);
|
|
32
|
-
push<T>(type: string, input: T, options?: PushEventOptions): Promise<import("
|
|
33
|
-
bulkPush<T>(type: string, inputs: EventWithMetadata<T>[], options?: PushEventOptions): Promise<import("
|
|
32
|
+
push<T>(type: string, input: T, options?: PushEventOptions): Promise<import("../../../protoc/events/events").Event>;
|
|
33
|
+
bulkPush<T>(type: string, inputs: EventWithMetadata<T>[], options?: PushEventOptions): Promise<import("../../../protoc/events/events").Events>;
|
|
34
34
|
putLog(taskRunExternalId: string, log: string, level?: LogLevel, taskRetryCount?: number, metadata?: Record<string, any>): Promise<void>;
|
|
35
35
|
putStream(taskRunExternalId: string, data: string | Uint8Array, index: number | undefined): Promise<void>;
|
|
36
36
|
list(opts?: Parameters<typeof this.api.v1EventList>[1]): Promise<import("../rest/generated/data-contracts").V1EventList>;
|
|
@@ -13,10 +13,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.EventClient = exports.LogLevel = void 0;
|
|
16
|
-
const events_1 = require("
|
|
17
|
-
const hatchet_error_1 = __importDefault(require("
|
|
18
|
-
const retrier_1 = require("
|
|
19
|
-
const apply_namespace_1 = require("
|
|
16
|
+
const events_1 = require("../../../protoc/events/events");
|
|
17
|
+
const hatchet_error_1 = __importDefault(require("../../../util/errors/hatchet-error"));
|
|
18
|
+
const retrier_1 = require("../../../util/retrier");
|
|
19
|
+
const apply_namespace_1 = require("../../../util/apply-namespace");
|
|
20
20
|
// eslint-disable-next-line no-shadow
|
|
21
21
|
var LogLevel;
|
|
22
22
|
(function (LogLevel) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChannelCredentials } from 'nice-grpc';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import type { Context } from '
|
|
4
|
-
import { Logger, LogLevel } from '
|
|
3
|
+
import type { Context } from '../../../v1/client/worker/context';
|
|
4
|
+
import { Logger, LogLevel } from '../../../util/logger';
|
|
5
5
|
declare const ClientTLSConfigSchema: z.ZodObject<{
|
|
6
6
|
tls_strategy: z.ZodOptional<z.ZodEnum<["tls", "mtls", "none"]>>;
|
|
7
7
|
cert_file: z.ZodOptional<z.ZodString>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LogExtra, Logger, LogLevel } from '
|
|
1
|
+
import { LogExtra, Logger, LogLevel } from '../../../util/logger';
|
|
2
2
|
export declare const DEFAULT_LOGGER: (context: string, logLevel?: LogLevel) => HatchetLogger;
|
|
3
3
|
type UtilKeys = 'trace';
|
|
4
4
|
export declare class HatchetLogger implements Logger {
|
|
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.HatchetLogger = exports.DEFAULT_LOGGER = void 0;
|
|
13
13
|
/* eslint-disable no-console */
|
|
14
|
-
const logger_1 = require("
|
|
14
|
+
const logger_1 = require("../../../util/logger");
|
|
15
15
|
const DEFAULT_LOGGER = (context, logLevel) => new HatchetLogger(context, logLevel);
|
|
16
16
|
exports.DEFAULT_LOGGER = DEFAULT_LOGGER;
|
|
17
17
|
class HatchetLogger {
|
|
@@ -17,5 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.HatchetLogger = void 0;
|
|
18
18
|
__exportStar(require("../../legacy/legacy-client"), exports);
|
|
19
19
|
__exportStar(require("./client-config"), exports);
|
|
20
|
-
var hatchet_logger_1 = require("
|
|
20
|
+
var hatchet_logger_1 = require("../../../clients/hatchet-client/hatchet-logger");
|
|
21
21
|
Object.defineProperty(exports, "HatchetLogger", { enumerable: true, get: function () { return hatchet_logger_1.HatchetLogger; } });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Channel, ClientFactory } from 'nice-grpc';
|
|
2
|
-
import { ClientConfig } from '
|
|
3
|
-
import { Logger } from '
|
|
4
|
-
import { V1DispatcherClient } from '
|
|
5
|
-
import { SleepMatchCondition, UserEventMatchCondition } from '
|
|
2
|
+
import { ClientConfig } from '../../../../clients/hatchet-client/client-config';
|
|
3
|
+
import { Logger } from '../../../../util/logger';
|
|
4
|
+
import { V1DispatcherClient } from '../../../../protoc/v1/dispatcher';
|
|
5
|
+
import { SleepMatchCondition, UserEventMatchCondition } from '../../../../protoc/v1/shared/condition';
|
|
6
6
|
import { Api } from '../../rest';
|
|
7
7
|
import { DurableEventGrpcPooledListener } from './pooled-durable-listener-client';
|
|
8
8
|
export declare class DurableListenerClient {
|
|
@@ -21,11 +21,11 @@ export declare class DurableListenerClient {
|
|
|
21
21
|
signalKey: string;
|
|
22
22
|
}, opts?: {
|
|
23
23
|
signal?: AbortSignal;
|
|
24
|
-
}): Promise<import("
|
|
24
|
+
}): Promise<import("../../../../protoc/v1/dispatcher").DurableEvent>;
|
|
25
25
|
registerDurableEvent(request: {
|
|
26
26
|
taskId: string;
|
|
27
27
|
signalKey: string;
|
|
28
28
|
sleepConditions: Array<SleepMatchCondition>;
|
|
29
29
|
userEventConditions: Array<UserEventMatchCondition>;
|
|
30
|
-
}): Promise<import("
|
|
30
|
+
}): Promise<import("../../../../protoc/v1/dispatcher").RegisterDurableEventResponse>;
|
|
31
31
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DurableListenerClient = void 0;
|
|
4
|
-
const dispatcher_1 = require("
|
|
4
|
+
const dispatcher_1 = require("../../../../protoc/v1/dispatcher");
|
|
5
5
|
const pooled_durable_listener_client_1 = require("./pooled-durable-listener-client");
|
|
6
6
|
class DurableListenerClient {
|
|
7
7
|
constructor(config, channel, factory, api) {
|
package/{clients → src/clients}/listeners/durable-listener/pooled-durable-listener-client.d.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import { DurableEvent, RegisterDurableEventResponse } from '
|
|
3
|
-
import { SleepMatchCondition, UserEventMatchCondition } from '
|
|
2
|
+
import { DurableEvent, RegisterDurableEventResponse } from '../../../../protoc/v1/dispatcher';
|
|
3
|
+
import { SleepMatchCondition, UserEventMatchCondition } from '../../../../protoc/v1/shared/condition';
|
|
4
4
|
import { DurableListenerClient } from './durable-listener-client';
|
|
5
5
|
export declare class DurableEventStreamable {
|
|
6
6
|
listener: AsyncIterable<DurableEvent>;
|
package/{clients → src/clients}/listeners/durable-listener/pooled-durable-listener-client.js
RENAMED
|
@@ -36,8 +36,8 @@ exports.DurableEventGrpcPooledListener = exports.DurableEventStreamable = void 0
|
|
|
36
36
|
// eslint-disable-next-line max-classes-per-file
|
|
37
37
|
const events_1 = require("events");
|
|
38
38
|
const abort_controller_x_1 = require("abort-controller-x");
|
|
39
|
-
const sleep_1 = __importDefault(require("
|
|
40
|
-
const abort_error_1 = require("
|
|
39
|
+
const sleep_1 = __importDefault(require("../../../../util/sleep"));
|
|
40
|
+
const abort_error_1 = require("../../../../util/abort-error");
|
|
41
41
|
class DurableEventStreamable {
|
|
42
42
|
constructor(listener, taskId, signalKey, subscriptionId, onCleanup) {
|
|
43
43
|
this.responseEmitter = new events_1.EventEmitter();
|