@temporal-contract/client 2.0.0 → 2.1.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/dist/index.cjs CHANGED
@@ -1,7 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let _temporalio_common = require("@temporalio/common");
3
3
  let neverthrow = require("neverthrow");
4
+ let _temporal_contract_contract = require("@temporal-contract/contract");
4
5
  let _temporalio_client = require("@temporalio/client");
6
+ let _temporal_contract_contract_result_async = require("@temporal-contract/contract/result-async");
5
7
  //#region src/errors.ts
6
8
  /**
7
9
  * Base class for all typed client errors with boxed pattern
@@ -77,11 +79,17 @@ var WorkflowExecutionNotFoundError = class extends TypedClientError {
77
79
  * on a workflow's result and the workflow completes with a failure —
78
80
  * Temporal's `WorkflowFailedError`.
79
81
  *
80
- * `cause` is the *unwrapped* underlying failure (typically an
82
+ * `cause` is the *unwrapped* underlying {@link TemporalFailure} (typically an
81
83
  * `ApplicationFailure`, `CancelledFailure`, `TerminatedFailure`, or
82
84
  * `TimeoutFailure`) lifted from Temporal's wrapper, so callers can branch
83
85
  * on the failure category in one step (`err.cause instanceof
84
- * ApplicationFailure`) instead of unwrapping twice via the SDK wrapper.
86
+ * ApplicationFailure`) instead of unwrapping twice via the SDK wrapper. The
87
+ * SDK declares `WorkflowFailedError.cause` as the wider `Error | undefined`
88
+ * (since `cause` lives on `Error`), but the runtime guarantee — driven by
89
+ * Temporal's wire format — is that it is always a `TemporalFailure` subclass
90
+ * when the wrapper is surfaced. `classifyResultError` narrows that wider
91
+ * static type to the public {@link TemporalFailure} union with a cast, so
92
+ * consumers see the precise leaf-failure typing instead of a bare `Error`.
85
93
  *
86
94
  * Returned from `executeWorkflow` and `handle.result()`.
87
95
  */
@@ -94,57 +102,11 @@ var WorkflowFailedError = class extends TypedClientError {
94
102
  }
95
103
  };
96
104
  /**
97
- * Pattern for string keys safe to render with dot notation. A "safe" key is a
98
- * JavaScript identifier (letters/digits/underscore/$, not starting with a
99
- * digit). Anything else — keys containing dots, spaces, leading digits, the
100
- * empty string, the literal string `"0"` etc. — gets bracket-quoted so the
101
- * path is unambiguous.
102
- *
103
- * This helper is intentionally duplicated with the worker package so each
104
- * entry point is self-contained; keep the two copies in sync.
105
- */
106
- const SAFE_IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
107
- /**
108
- * Render a Standard Schema {@link StandardSchemaV1.Issue} into a human-readable
109
- * string that includes the failing field's path.
110
- *
111
- * Example output:
112
- * - `at items[0].quantity: Expected number, received undefined`
113
- * - `at customerId: Expected string, received undefined`
114
- * - `at user["first name"]: Expected string, received undefined`
115
- * - `Validation error` *(no path)*
116
- *
117
- * Path segments come either as bare `PropertyKey` values or as
118
- * `{ key: PropertyKey }` objects (per the spec); both are normalized.
119
- * - Numeric keys → `[N]`
120
- * - String keys that are valid JS identifiers → bare (first) or `.key`
121
- * - String keys that aren't valid identifiers → `["..."]` with JSON-style
122
- * escaping (handles dots, spaces, leading digits, the empty string, the
123
- * literal string `"0"`, embedded quotes, etc.)
124
- * - Symbol / other `PropertyKey` → `[Symbol(name)]`
125
- */
126
- function formatIssue(issue) {
127
- if (issue.path === void 0 || issue.path.length === 0) return issue.message;
128
- let path = "";
129
- for (let i = 0; i < issue.path.length; i++) {
130
- const segment = issue.path[i];
131
- const key = segment !== null && typeof segment === "object" && "key" in segment ? segment.key : segment;
132
- if (typeof key === "number") path += `[${key}]`;
133
- else if (typeof key === "string" && SAFE_IDENTIFIER.test(key)) path += i === 0 ? key : `.${key}`;
134
- else if (typeof key === "string") path += `[${JSON.stringify(key)}]`;
135
- else path += `[${String(key)}]`;
136
- }
137
- return `at ${path}: ${issue.message}`;
138
- }
139
- function summarizeIssues(issues) {
140
- return issues.map(formatIssue).join("; ");
141
- }
142
- /**
143
105
  * Thrown when workflow input or output validation fails
144
106
  */
145
107
  var WorkflowValidationError = class extends TypedClientError {
146
108
  constructor(workflowName, direction, issues) {
147
- super(`Validation failed for workflow "${workflowName}" ${direction}: ${summarizeIssues(issues)}`);
109
+ super(`Validation failed for workflow "${workflowName}" ${direction}: ${(0, _temporal_contract_contract.summarizeIssues)(issues)}`);
148
110
  this.workflowName = workflowName;
149
111
  this.direction = direction;
150
112
  this.issues = issues;
@@ -155,7 +117,7 @@ var WorkflowValidationError = class extends TypedClientError {
155
117
  */
156
118
  var QueryValidationError = class extends TypedClientError {
157
119
  constructor(queryName, direction, issues) {
158
- super(`Validation failed for query "${queryName}" ${direction}: ${summarizeIssues(issues)}`);
120
+ super(`Validation failed for query "${queryName}" ${direction}: ${(0, _temporal_contract_contract.summarizeIssues)(issues)}`);
159
121
  this.queryName = queryName;
160
122
  this.direction = direction;
161
123
  this.issues = issues;
@@ -166,7 +128,7 @@ var QueryValidationError = class extends TypedClientError {
166
128
  */
167
129
  var SignalValidationError = class extends TypedClientError {
168
130
  constructor(signalName, issues) {
169
- super(`Validation failed for signal "${signalName}": ${summarizeIssues(issues)}`);
131
+ super(`Validation failed for signal "${signalName}": ${(0, _temporal_contract_contract.summarizeIssues)(issues)}`);
170
132
  this.signalName = signalName;
171
133
  this.issues = issues;
172
134
  }
@@ -176,7 +138,7 @@ var SignalValidationError = class extends TypedClientError {
176
138
  */
177
139
  var UpdateValidationError = class extends TypedClientError {
178
140
  constructor(updateName, direction, issues) {
179
- super(`Validation failed for update "${updateName}" ${direction}: ${summarizeIssues(issues)}`);
141
+ super(`Validation failed for update "${updateName}" ${direction}: ${(0, _temporal_contract_contract.summarizeIssues)(issues)}`);
180
142
  this.updateName = updateName;
181
143
  this.direction = direction;
182
144
  this.issues = issues;
@@ -201,10 +163,12 @@ var UpdateValidationError = class extends TypedClientError {
201
163
  *
202
164
  * Used by `client.ts` (workflow operations) and `schedule.ts` (schedule
203
165
  * operations) so the unexpected-rejection shape is identical across the
204
- * typed client surface.
166
+ * typed client surface. Delegates to `_internal_makeResultAsync` from
167
+ * `@temporal-contract/contract` so the same wrapper is shared between the
168
+ * client and worker packages.
205
169
  */
206
170
  function makeResultAsync(work) {
207
- return new neverthrow.ResultAsync(work().catch((e) => (0, neverthrow.err)(new RuntimeClientError("unexpected", e))));
171
+ return (0, _temporal_contract_contract_result_async._internal_makeResultAsync)(work, (e) => new RuntimeClientError("unexpected", e));
208
172
  }
209
173
  /**
210
174
  * Map a thrown error from `client.workflow.start` / `signalWithStart` into
@@ -273,9 +237,9 @@ var TypedScheduleClient = class {
273
237
  create(workflowName, options) {
274
238
  const work = async () => {
275
239
  const definition = this.contract.workflows[workflowName];
276
- if (!definition) return (0, neverthrow.err)(new WorkflowNotFoundError(String(workflowName), Object.keys(this.contract.workflows)));
240
+ if (!definition) return (0, neverthrow.err)(new WorkflowNotFoundError(workflowName, Object.keys(this.contract.workflows)));
277
241
  const inputResult = await definition.input["~standard"].validate(options.args);
278
- if (inputResult.issues) return (0, neverthrow.err)(new WorkflowValidationError(String(workflowName), "input", inputResult.issues));
242
+ if (inputResult.issues) return (0, neverthrow.err)(new WorkflowValidationError(workflowName, "input", inputResult.issues));
279
243
  try {
280
244
  const overrides = options.action ?? {};
281
245
  const action = {
@@ -352,6 +316,36 @@ function toTypedSearchAttributes(workflowDef, values) {
352
316
  return pairs.length > 0 ? new _temporalio_common.TypedSearchAttributes(pairs) : void 0;
353
317
  }
354
318
  /**
319
+ * Shared pre-call ritual for the three contract-driven entry points that
320
+ * actually start a workflow (`startWorkflow`, `signalWithStart`,
321
+ * `executeWorkflow`):
322
+ *
323
+ * 1. Look up the workflow definition on the contract.
324
+ * 2. Surface a `WorkflowNotFoundError` if absent.
325
+ * 3. Validate `args` against the workflow's input schema.
326
+ * 4. Surface a `WorkflowValidationError` if validation fails.
327
+ * 5. Translate any caller-supplied `searchAttributes` into Temporal's
328
+ * `TypedSearchAttributes` shape (or `undefined`).
329
+ *
330
+ * `getHandle` deliberately keeps its own three-line lookup — it doesn't
331
+ * accept `args` or `searchAttributes`, so it can't share this helper. The
332
+ * call-specific extras (signal validation, post-call output validation,
333
+ * extended error classification) stay at the call site — those are the
334
+ * differentiators that make each method distinct.
335
+ */
336
+ async function resolveDefinitionAndValidateInput(contract, workflowName, args, searchAttributes) {
337
+ const definition = contract.workflows[workflowName];
338
+ if (!definition) return (0, neverthrow.err)(createWorkflowNotFoundError(workflowName, contract));
339
+ const inputResult = await definition.input["~standard"].validate(args);
340
+ if (inputResult.issues) return (0, neverthrow.err)(createWorkflowValidationError(workflowName, "input", inputResult.issues));
341
+ const typedSearchAttributes = toTypedSearchAttributes(definition, searchAttributes);
342
+ return (0, neverthrow.ok)({
343
+ definition,
344
+ validatedInput: inputResult.value,
345
+ typedSearchAttributes
346
+ });
347
+ }
348
+ /**
355
349
  * Typed Temporal client with neverthrow Result/ResultAsync pattern based on a contract
356
350
  *
357
351
  * Provides type-safe methods to start and execute workflows
@@ -435,16 +429,14 @@ var TypedClient = class TypedClient {
435
429
  */
436
430
  startWorkflow(workflowName, { args, searchAttributes, ...temporalOptions }) {
437
431
  const work = async () => {
438
- const definition = this.contract.workflows[workflowName];
439
- if (!definition) return (0, neverthrow.err)(createWorkflowNotFoundError(workflowName, this.contract));
440
- const inputResult = await definition.input["~standard"].validate(args);
441
- if (inputResult.issues) return (0, neverthrow.err)(createWorkflowValidationError(workflowName, "input", inputResult.issues));
442
- const typedSearchAttributes = toTypedSearchAttributes(definition, searchAttributes);
432
+ const resolved = await resolveDefinitionAndValidateInput(this.contract, workflowName, args, searchAttributes);
433
+ if (resolved.isErr()) return (0, neverthrow.err)(resolved.error);
434
+ const { definition, validatedInput, typedSearchAttributes } = resolved.value;
443
435
  try {
444
436
  const handle = await this.client.workflow.start(workflowName, {
445
437
  ...temporalOptions,
446
438
  taskQueue: this.contract.taskQueue,
447
- args: [inputResult.value],
439
+ args: [validatedInput],
448
440
  ...typedSearchAttributes ? { typedSearchAttributes } : {}
449
441
  });
450
442
  return (0, neverthrow.ok)(this.createTypedHandle(handle, definition));
@@ -482,20 +474,18 @@ var TypedClient = class TypedClient {
482
474
  */
483
475
  signalWithStart(workflowName, { args, signalName, signalArgs, searchAttributes, ...temporalOptions }) {
484
476
  const work = async () => {
485
- const definition = this.contract.workflows[workflowName];
486
- if (!definition) return (0, neverthrow.err)(createWorkflowNotFoundError(workflowName, this.contract));
487
- const inputResult = await definition.input["~standard"].validate(args);
488
- if (inputResult.issues) return (0, neverthrow.err)(createWorkflowValidationError(workflowName, "input", inputResult.issues));
477
+ const resolved = await resolveDefinitionAndValidateInput(this.contract, workflowName, args, searchAttributes);
478
+ if (resolved.isErr()) return (0, neverthrow.err)(resolved.error);
479
+ const { definition, validatedInput, typedSearchAttributes } = resolved.value;
489
480
  const signalDef = definition.signals?.[signalName];
490
- if (!signalDef) return (0, neverthrow.err)(new SignalValidationError(signalName, [{ message: `Signal "${signalName}" is not declared on workflow "${String(workflowName)}".` }]));
481
+ if (!signalDef) return (0, neverthrow.err)(new SignalValidationError(signalName, [{ message: `Signal "${signalName}" is not declared on workflow "${workflowName}".` }]));
491
482
  const signalInputResult = await signalDef.input["~standard"].validate(signalArgs);
492
483
  if (signalInputResult.issues) return (0, neverthrow.err)(new SignalValidationError(signalName, signalInputResult.issues));
493
- const typedSearchAttributes = toTypedSearchAttributes(definition, searchAttributes);
494
484
  try {
495
485
  const handle = await this.client.workflow.signalWithStart(workflowName, {
496
486
  ...temporalOptions,
497
487
  taskQueue: this.contract.taskQueue,
498
- args: [inputResult.value],
488
+ args: [validatedInput],
499
489
  signal: signalName,
500
490
  signalArgs: [signalInputResult.value],
501
491
  ...typedSearchAttributes ? { typedSearchAttributes } : {}
@@ -530,16 +520,14 @@ var TypedClient = class TypedClient {
530
520
  */
531
521
  executeWorkflow(workflowName, { args, searchAttributes, ...temporalOptions }) {
532
522
  const work = async () => {
533
- const definition = this.contract.workflows[workflowName];
534
- if (!definition) return (0, neverthrow.err)(createWorkflowNotFoundError(workflowName, this.contract));
535
- const inputResult = await definition.input["~standard"].validate(args);
536
- if (inputResult.issues) return (0, neverthrow.err)(createWorkflowValidationError(workflowName, "input", inputResult.issues));
537
- const typedSearchAttributes = toTypedSearchAttributes(definition, searchAttributes);
523
+ const resolved = await resolveDefinitionAndValidateInput(this.contract, workflowName, args, searchAttributes);
524
+ if (resolved.isErr()) return (0, neverthrow.err)(resolved.error);
525
+ const { definition, validatedInput, typedSearchAttributes } = resolved.value;
538
526
  try {
539
527
  const result = await this.client.workflow.execute(workflowName, {
540
528
  ...temporalOptions,
541
529
  taskQueue: this.contract.taskQueue,
542
- args: [inputResult.value],
530
+ args: [validatedInput],
543
531
  ...typedSearchAttributes ? { typedSearchAttributes } : {}
544
532
  });
545
533
  const outputResult = await definition.output["~standard"].validate(result);
package/dist/index.d.cts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { Client, ScheduleClient, ScheduleDescription, ScheduleOptions, ScheduleOptionsStartWorkflowAction, ScheduleOverlapPolicy, ScheduleSpec, WorkflowHandle, WorkflowSignalWithStartOptions, WorkflowStartOptions } from "@temporalio/client";
2
- import { ActivityDefinition, AnySchema, ContractDefinition, QueryDefinition, SearchAttributeDefinition, SearchAttributeKindToType, SignalDefinition, UpdateDefinition, WorkflowDefinition } from "@temporal-contract/contract";
2
+ import { ActivityDefinition, AnySchema, AnyWorkflowDefinition, ContractDefinition, QueryDefinition, SearchAttributeDefinition, SearchAttributeKindToType, SignalDefinition, SignalNamesOf, UpdateDefinition } from "@temporal-contract/contract";
3
3
  import { StandardSchemaV1 } from "@standard-schema/spec";
4
4
  import { ResultAsync } from "neverthrow";
5
+ import { ActivityFailure, ApplicationFailure, CancelledFailure, ChildWorkflowFailure, ServerFailure, TerminatedFailure, TimeoutFailure } from "@temporalio/common";
5
6
 
6
7
  //#region src/types.d.ts
7
8
  /**
@@ -26,7 +27,7 @@ type ClientInferOutput<T extends {
26
27
  * Infer workflow function signature from client perspective
27
28
  * Client sends z.output and receives z.input
28
29
  */
29
- type ClientInferWorkflow<TWorkflow extends WorkflowDefinition> = (args: ClientInferInput<TWorkflow>) => Promise<ClientInferOutput<TWorkflow>>;
30
+ type ClientInferWorkflow<TWorkflow extends AnyWorkflowDefinition> = (args: ClientInferInput<TWorkflow>) => Promise<ClientInferOutput<TWorkflow>>;
30
31
  /**
31
32
  * Infer activity function signature from client perspective
32
33
  * Client sends z.output and receives z.input
@@ -61,26 +62,37 @@ type ClientInferActivities<TContract extends ContractDefinition> = TContract["ac
61
62
  /**
62
63
  * Infer activities from a workflow definition (client perspective)
63
64
  */
64
- type ClientInferWorkflowActivities<T extends WorkflowDefinition> = T["activities"] extends Record<string, ActivityDefinition> ? { [K in keyof T["activities"]]: ClientInferActivity<T["activities"][K]> } : {};
65
+ type ClientInferWorkflowActivities<T extends AnyWorkflowDefinition> = T["activities"] extends Record<string, ActivityDefinition> ? { [K in keyof T["activities"]]: ClientInferActivity<T["activities"][K]> } : {};
65
66
  /**
66
67
  * Infer signals from a workflow definition (client perspective)
67
68
  */
68
- type ClientInferWorkflowSignals<T extends WorkflowDefinition> = T["signals"] extends Record<string, SignalDefinition> ? { [K in keyof T["signals"]]: ClientInferSignal<T["signals"][K]> } : {};
69
+ type ClientInferWorkflowSignals<T extends AnyWorkflowDefinition> = T["signals"] extends Record<string, SignalDefinition> ? { [K in keyof T["signals"]]: ClientInferSignal<T["signals"][K]> } : {};
69
70
  /**
70
71
  * Infer queries from a workflow definition (client perspective)
71
72
  */
72
- type ClientInferWorkflowQueries<T extends WorkflowDefinition> = T["queries"] extends Record<string, QueryDefinition> ? { [K in keyof T["queries"]]: ClientInferQuery<T["queries"][K]> } : {};
73
+ type ClientInferWorkflowQueries<T extends AnyWorkflowDefinition> = T["queries"] extends Record<string, QueryDefinition> ? { [K in keyof T["queries"]]: ClientInferQuery<T["queries"][K]> } : {};
73
74
  /**
74
75
  * Infer updates from a workflow definition (client perspective)
75
76
  */
76
- type ClientInferWorkflowUpdates<T extends WorkflowDefinition> = T["updates"] extends Record<string, UpdateDefinition> ? { [K in keyof T["updates"]]: ClientInferUpdate<T["updates"][K]> } : {};
77
+ type ClientInferWorkflowUpdates<T extends AnyWorkflowDefinition> = T["updates"] extends Record<string, UpdateDefinition> ? { [K in keyof T["updates"]]: ClientInferUpdate<T["updates"][K]> } : {};
77
78
  /**
78
79
  * Infer all activities available in a workflow context (client perspective)
79
80
  * Combines workflow-specific activities with global activities
80
81
  */
81
- type ClientInferWorkflowContextActivities<TContract extends ContractDefinition, TWorkflowName extends keyof TContract["workflows"]> = ClientInferWorkflowActivities<TContract["workflows"][TWorkflowName]> & ClientInferActivities<TContract>;
82
+ type ClientInferWorkflowContextActivities<TContract extends ContractDefinition, TWorkflowName extends keyof TContract["workflows"] & string> = ClientInferWorkflowActivities<TContract["workflows"][TWorkflowName]> & ClientInferActivities<TContract>;
82
83
  //#endregion
83
84
  //#region src/errors.d.ts
85
+ /**
86
+ * Union of the actionable Temporal failure types that can surface as the
87
+ * `cause` of a `WorkflowFailedError`. These all extend Temporal's internal
88
+ * `TemporalFailure` base class — we list them by leaf type rather than by
89
+ * the base class so consumer code can use a single `switch (true)` over
90
+ * `instanceof` discriminants without an exhaustiveness escape hatch.
91
+ *
92
+ * Re-exported from the package entry point so consumers can import it
93
+ * directly: `import type { TemporalFailure } from "@temporal-contract/client"`.
94
+ */
95
+ type TemporalFailure = ApplicationFailure | CancelledFailure | TerminatedFailure | TimeoutFailure | ChildWorkflowFailure | ServerFailure | ActivityFailure;
84
96
  /**
85
97
  * Base class for all typed client errors with boxed pattern
86
98
  */
@@ -143,18 +155,24 @@ declare class WorkflowExecutionNotFoundError extends TypedClientError {
143
155
  * on a workflow's result and the workflow completes with a failure —
144
156
  * Temporal's `WorkflowFailedError`.
145
157
  *
146
- * `cause` is the *unwrapped* underlying failure (typically an
158
+ * `cause` is the *unwrapped* underlying {@link TemporalFailure} (typically an
147
159
  * `ApplicationFailure`, `CancelledFailure`, `TerminatedFailure`, or
148
160
  * `TimeoutFailure`) lifted from Temporal's wrapper, so callers can branch
149
161
  * on the failure category in one step (`err.cause instanceof
150
- * ApplicationFailure`) instead of unwrapping twice via the SDK wrapper.
162
+ * ApplicationFailure`) instead of unwrapping twice via the SDK wrapper. The
163
+ * SDK declares `WorkflowFailedError.cause` as the wider `Error | undefined`
164
+ * (since `cause` lives on `Error`), but the runtime guarantee — driven by
165
+ * Temporal's wire format — is that it is always a `TemporalFailure` subclass
166
+ * when the wrapper is surfaced. `classifyResultError` narrows that wider
167
+ * static type to the public {@link TemporalFailure} union with a cast, so
168
+ * consumers see the precise leaf-failure typing instead of a bare `Error`.
151
169
  *
152
170
  * Returned from `executeWorkflow` and `handle.result()`.
153
171
  */
154
172
  declare class WorkflowFailedError extends TypedClientError {
155
173
  readonly workflowId: string;
156
- readonly cause?: unknown | undefined;
157
- constructor(workflowId: string, cause?: unknown | undefined);
174
+ readonly cause?: TemporalFailure | undefined;
175
+ constructor(workflowId: string, cause?: TemporalFailure | undefined);
158
176
  }
159
177
  /**
160
178
  * Thrown when workflow input or output validation fails
@@ -213,7 +231,7 @@ type TypedScheduleActionOverrides = Pick<ScheduleOptionsStartWorkflowAction<neve
213
231
  * Workflow-action–level overrides nest under {@link action} so memo and
214
232
  * other fields with the same name don't collide between the two scopes.
215
233
  */
216
- type TypedScheduleCreateOptions<TContract extends ContractDefinition, TWorkflowName extends keyof TContract["workflows"]> = {
234
+ type TypedScheduleCreateOptions<TContract extends ContractDefinition, TWorkflowName extends keyof TContract["workflows"] & string> = {
217
235
  /** Schedule ID. Recommended to use a meaningful business identifier. */scheduleId: string; /** When the schedule should fire (cron, interval, calendar). */
218
236
  spec: ScheduleSpec; /** Workflow input — validated against the contract's input schema. */
219
237
  args: ClientInferInput<TContract["workflows"][TWorkflowName]>; /** Temporal schedule policies (overlap, catchupWindow, pauseOnFailure, etc.). */
@@ -261,7 +279,7 @@ declare class TypedScheduleClient<TContract extends ContractDefinition> {
261
279
  * `workflowType` are pulled from the contract automatically; the typed
262
280
  * options shape omits them so call sites don't have to repeat themselves.
263
281
  */
264
- create<TWorkflowName extends keyof TContract["workflows"]>(workflowName: TWorkflowName, options: TypedScheduleCreateOptions<TContract, TWorkflowName>): ResultAsync<TypedScheduleHandle, WorkflowNotFoundError | WorkflowValidationError | RuntimeClientError>;
282
+ create<TWorkflowName extends keyof TContract["workflows"] & string>(workflowName: TWorkflowName, options: TypedScheduleCreateOptions<TContract, TWorkflowName>): ResultAsync<TypedScheduleHandle, WorkflowNotFoundError | WorkflowValidationError | RuntimeClientError>;
265
283
  /**
266
284
  * Get a typed handle to an existing schedule. Does not validate that the
267
285
  * schedule exists — handle methods (`describe`, `pause`, etc.) will
@@ -282,8 +300,8 @@ declare class TypedScheduleClient<TContract extends ContractDefinition> {
282
300
  * meaning the `searchAttributes` field is effectively absent from the start
283
301
  * options for that workflow.
284
302
  */
285
- type TypedSearchAttributeMap<TWorkflow extends WorkflowDefinition> = TWorkflow["searchAttributes"] extends Record<string, SearchAttributeDefinition> ? { [K in keyof TWorkflow["searchAttributes"]]?: SearchAttributeKindToType<TWorkflow["searchAttributes"][K]["kind"]> } : never;
286
- type TypedWorkflowStartOptions<TContract extends ContractDefinition, TWorkflowName extends keyof TContract["workflows"]> = Omit<WorkflowStartOptions, "taskQueue" | "args" | "searchAttributes" | "typedSearchAttributes"> & {
303
+ type TypedSearchAttributeMap<TWorkflow extends AnyWorkflowDefinition> = TWorkflow["searchAttributes"] extends Record<string, SearchAttributeDefinition> ? { [K in keyof TWorkflow["searchAttributes"]]?: SearchAttributeKindToType<TWorkflow["searchAttributes"][K]["kind"]> } : never;
304
+ type TypedWorkflowStartOptions<TContract extends ContractDefinition, TWorkflowName extends keyof TContract["workflows"] & string> = Omit<WorkflowStartOptions, "taskQueue" | "args" | "searchAttributes" | "typedSearchAttributes"> & {
287
305
  args: ClientInferInput<TContract["workflows"][TWorkflowName]>;
288
306
  /**
289
307
  * Indexed search attributes for the started workflow. Keys and value types
@@ -297,7 +315,7 @@ type TypedWorkflowStartOptions<TContract extends ContractDefinition, TWorkflowNa
297
315
  * Options for {@link TypedClient.signalWithStart} — typed against both the
298
316
  * workflow's input schema and the named signal's input schema.
299
317
  */
300
- type TypedSignalWithStartOptions<TContract extends ContractDefinition, TWorkflowName extends keyof TContract["workflows"], TSignalName extends keyof TContract["workflows"][TWorkflowName]["signals"] & string> = Omit<WorkflowSignalWithStartOptions, "taskQueue" | "args" | "signal" | "signalArgs" | "searchAttributes" | "typedSearchAttributes"> & {
318
+ type TypedSignalWithStartOptions<TContract extends ContractDefinition, TWorkflowName extends keyof TContract["workflows"] & string, TSignalName extends SignalNamesOf<TContract["workflows"][TWorkflowName]>> = Omit<WorkflowSignalWithStartOptions, "taskQueue" | "args" | "signal" | "signalArgs" | "searchAttributes" | "typedSearchAttributes"> & {
301
319
  args: ClientInferInput<TContract["workflows"][TWorkflowName]>;
302
320
  signalName: TSignalName;
303
321
  signalArgs: TContract["workflows"][TWorkflowName]["signals"][TSignalName] extends SignalDefinition ? ClientInferInput<TContract["workflows"][TWorkflowName]["signals"][TSignalName]> : never;
@@ -314,7 +332,7 @@ type TypedSignalWithStartOptions<TContract extends ContractDefinition, TWorkflow
314
332
  * to the standard handle so callers can correlate the signal with the
315
333
  * (possibly pre-existing) workflow execution chain.
316
334
  */
317
- type TypedWorkflowHandleWithSignaledRunId<TWorkflow extends WorkflowDefinition> = TypedWorkflowHandle<TWorkflow> & {
335
+ type TypedWorkflowHandleWithSignaledRunId<TWorkflow extends AnyWorkflowDefinition> = TypedWorkflowHandle<TWorkflow> & {
318
336
  /**
319
337
  * The Run Id of the bound Workflow at the time of `signalWithStart`. Since
320
338
  * `signalWithStart` may have signaled an existing Workflow Chain, this is
@@ -325,7 +343,7 @@ type TypedWorkflowHandleWithSignaledRunId<TWorkflow extends WorkflowDefinition>
325
343
  /**
326
344
  * Typed workflow handle with validated results using neverthrow Result/ResultAsync
327
345
  */
328
- type TypedWorkflowHandle<TWorkflow extends WorkflowDefinition> = {
346
+ type TypedWorkflowHandle<TWorkflow extends AnyWorkflowDefinition> = {
329
347
  workflowId: string;
330
348
  /**
331
349
  * Type-safe queries based on workflow definition with Result pattern
@@ -440,7 +458,7 @@ declare class TypedClient<TContract extends ContractDefinition> {
440
458
  * );
441
459
  * ```
442
460
  */
443
- startWorkflow<TWorkflowName extends keyof TContract["workflows"]>(workflowName: TWorkflowName, {
461
+ startWorkflow<TWorkflowName extends keyof TContract["workflows"] & string>(workflowName: TWorkflowName, {
444
462
  args,
445
463
  searchAttributes,
446
464
  ...temporalOptions
@@ -471,7 +489,7 @@ declare class TypedClient<TContract extends ContractDefinition> {
471
489
  * );
472
490
  * ```
473
491
  */
474
- signalWithStart<TWorkflowName extends keyof TContract["workflows"], TSignalName extends keyof TContract["workflows"][TWorkflowName]["signals"] & string>(workflowName: TWorkflowName, {
492
+ signalWithStart<TWorkflowName extends keyof TContract["workflows"] & string, TSignalName extends SignalNamesOf<TContract["workflows"][TWorkflowName]>>(workflowName: TWorkflowName, {
475
493
  args,
476
494
  signalName,
477
495
  signalArgs,
@@ -496,7 +514,7 @@ declare class TypedClient<TContract extends ContractDefinition> {
496
514
  * );
497
515
  * ```
498
516
  */
499
- executeWorkflow<TWorkflowName extends keyof TContract["workflows"]>(workflowName: TWorkflowName, {
517
+ executeWorkflow<TWorkflowName extends keyof TContract["workflows"] & string>(workflowName: TWorkflowName, {
500
518
  args,
501
519
  searchAttributes,
502
520
  ...temporalOptions
@@ -516,9 +534,9 @@ declare class TypedClient<TContract extends ContractDefinition> {
516
534
  * );
517
535
  * ```
518
536
  */
519
- getHandle<TWorkflowName extends keyof TContract["workflows"]>(workflowName: TWorkflowName, workflowId: string): ResultAsync<TypedWorkflowHandle<TContract["workflows"][TWorkflowName]>, WorkflowNotFoundError | RuntimeClientError>;
537
+ getHandle<TWorkflowName extends keyof TContract["workflows"] & string>(workflowName: TWorkflowName, workflowId: string): ResultAsync<TypedWorkflowHandle<TContract["workflows"][TWorkflowName]>, WorkflowNotFoundError | RuntimeClientError>;
520
538
  private createTypedHandle;
521
539
  }
522
540
  //#endregion
523
- export { type ClientInferActivities, type ClientInferActivity, type ClientInferInput, type ClientInferOutput, type ClientInferQuery, type ClientInferSignal, type ClientInferUpdate, type ClientInferWorkflow, type ClientInferWorkflowActivities, type ClientInferWorkflowContextActivities, type ClientInferWorkflowQueries, type ClientInferWorkflowSignals, type ClientInferWorkflowUpdates, type ClientInferWorkflows, QueryValidationError, RuntimeClientError, SignalValidationError, TypedClient, type TypedScheduleActionOverrides, TypedScheduleClient, type TypedScheduleCreateOptions, type TypedScheduleHandle, type TypedSignalWithStartOptions, type TypedWorkflowHandle, type TypedWorkflowHandleWithSignaledRunId, type TypedWorkflowStartOptions, UpdateValidationError, WorkflowAlreadyStartedError, WorkflowExecutionNotFoundError, WorkflowFailedError, WorkflowNotFoundError, WorkflowValidationError };
541
+ export { type ClientInferActivities, type ClientInferActivity, type ClientInferInput, type ClientInferOutput, type ClientInferQuery, type ClientInferSignal, type ClientInferUpdate, type ClientInferWorkflow, type ClientInferWorkflowActivities, type ClientInferWorkflowContextActivities, type ClientInferWorkflowQueries, type ClientInferWorkflowSignals, type ClientInferWorkflowUpdates, type ClientInferWorkflows, QueryValidationError, RuntimeClientError, SignalValidationError, type TemporalFailure, TypedClient, type TypedScheduleActionOverrides, TypedScheduleClient, type TypedScheduleCreateOptions, type TypedScheduleHandle, type TypedSignalWithStartOptions, type TypedWorkflowHandle, type TypedWorkflowHandleWithSignaledRunId, type TypedWorkflowStartOptions, UpdateValidationError, WorkflowAlreadyStartedError, WorkflowExecutionNotFoundError, WorkflowFailedError, WorkflowNotFoundError, WorkflowValidationError };
524
542
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/errors.ts","../src/schedule.ts","../src/client.ts"],"mappings":";;;;;;;;;AAgBA;KAAY,gBAAA;EAA6B,KAAA,EAAO,SAAA;AAAA,KAAe,gBAAA,CAAiB,UAAA,CAC9E,CAAA;;;;;KAOU,iBAAA;EAA8B,MAAA,EAAQ,SAAA;AAAA,KAAe,gBAAA,CAAi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