@temporal-contract/client 2.0.0 → 2.2.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;
@@ -192,6 +154,37 @@ var UpdateValidationError = class extends TypedClientError {
192
154
  * In-package modules and tests import it directly via relative path.
193
155
  */
194
156
  /**
157
+ * Translate the contract's typed `searchAttributes` map (declared
158
+ * name → value) into a Temporal `TypedSearchAttributes` instance, so the
159
+ * Temporal client honours indexing when starting the workflow.
160
+ *
161
+ * Workflows without a `searchAttributes` block (or callers passing no
162
+ * values) resolve to `ok(undefined)`, matching the Temporal SDK's
163
+ * "absent ≠ empty" semantics.
164
+ *
165
+ * Returns `err(RuntimeClientError)` on unknown keys. The TypeScript
166
+ * surface already gates the happy path; the runtime check catches typed
167
+ * escape hatches (`as never`, `as any`, raw-call interop) where a typo
168
+ * would otherwise silently drop the attribute, leaving the workflow
169
+ * unindexed without any signal to the caller.
170
+ */
171
+ function toTypedSearchAttributes(workflowDef, workflowName, values) {
172
+ if (!values) return (0, neverthrow.ok)(void 0);
173
+ const declared = workflowDef.searchAttributes ?? {};
174
+ const pairs = [];
175
+ for (const [name, value] of Object.entries(values)) {
176
+ if (value === void 0) continue;
177
+ const def = declared[name];
178
+ if (!def) return (0, neverthrow.err)(new RuntimeClientError("searchAttributes", /* @__PURE__ */ new Error(`Search attribute "${name}" is not declared on workflow "${workflowName}". Declared attributes: ${Object.keys(declared).join(", ") || "none"}.`)));
179
+ const key = (0, _temporalio_common.defineSearchAttributeKey)(name, def.kind);
180
+ pairs.push({
181
+ key,
182
+ value
183
+ });
184
+ }
185
+ return (0, neverthrow.ok)(pairs.length > 0 ? new _temporalio_common.TypedSearchAttributes(pairs) : void 0);
186
+ }
187
+ /**
195
188
  * Wrap an async result-producing function in a `ResultAsync`, catching any
196
189
  * unhandled rejection as a `RuntimeClientError("unexpected", error)`.
197
190
  *
@@ -201,10 +194,12 @@ var UpdateValidationError = class extends TypedClientError {
201
194
  *
202
195
  * Used by `client.ts` (workflow operations) and `schedule.ts` (schedule
203
196
  * operations) so the unexpected-rejection shape is identical across the
204
- * typed client surface.
197
+ * typed client surface. Delegates to `_internal_makeResultAsync` from
198
+ * `@temporal-contract/contract` so the same wrapper is shared between the
199
+ * client and worker packages.
205
200
  */
206
201
  function makeResultAsync(work) {
207
- return new neverthrow.ResultAsync(work().catch((e) => (0, neverthrow.err)(new RuntimeClientError("unexpected", e))));
202
+ return (0, _temporal_contract_contract_result_async._internal_makeResultAsync)(work, (e) => new RuntimeClientError("unexpected", e));
208
203
  }
209
204
  /**
210
205
  * Map a thrown error from `client.workflow.start` / `signalWithStart` into
@@ -273,9 +268,12 @@ var TypedScheduleClient = class {
273
268
  create(workflowName, options) {
274
269
  const work = async () => {
275
270
  const definition = this.contract.workflows[workflowName];
276
- if (!definition) return (0, neverthrow.err)(new WorkflowNotFoundError(String(workflowName), Object.keys(this.contract.workflows)));
271
+ if (!definition) return (0, neverthrow.err)(new WorkflowNotFoundError(workflowName, Object.keys(this.contract.workflows)));
277
272
  const inputResult = await definition.input["~standard"].validate(options.args);
278
- if (inputResult.issues) return (0, neverthrow.err)(new WorkflowValidationError(String(workflowName), "input", inputResult.issues));
273
+ if (inputResult.issues) return (0, neverthrow.err)(new WorkflowValidationError(workflowName, "input", inputResult.issues));
274
+ const searchAttributesResult = toTypedSearchAttributes(definition, workflowName, options.searchAttributes);
275
+ if (searchAttributesResult.isErr()) return (0, neverthrow.err)(searchAttributesResult.error);
276
+ const typedSearchAttributes = searchAttributesResult.value;
279
277
  try {
280
278
  const overrides = options.action ?? {};
281
279
  const action = {
@@ -283,6 +281,7 @@ var TypedScheduleClient = class {
283
281
  workflowType: workflowName,
284
282
  taskQueue: this.contract.taskQueue,
285
283
  args: [inputResult.value],
284
+ ...typedSearchAttributes ? { typedSearchAttributes } : {},
286
285
  ...overrides.workflowId !== void 0 ? { workflowId: overrides.workflowId } : {},
287
286
  ...overrides.workflowExecutionTimeout !== void 0 ? { workflowExecutionTimeout: overrides.workflowExecutionTimeout } : {},
288
287
  ...overrides.workflowRunTimeout !== void 0 ? { workflowRunTimeout: overrides.workflowRunTimeout } : {},
@@ -328,28 +327,76 @@ function wrapScheduleHandle(handle) {
328
327
  //#endregion
329
328
  //#region src/client.ts
330
329
  /**
331
- * Translate the contract's typed `searchAttributes` map (declared
332
- * name value) into a Temporal `TypedSearchAttributes` instance, so the
333
- * Temporal client honours indexing when starting the workflow.
330
+ * Read declared search attributes off a `TypedSearchAttributes` instance
331
+ * the read-side counterpart to the write-side `searchAttributes` option on
332
+ * `startWorkflow` / `signalWithStart` / `executeWorkflow` /
333
+ * `schedule.create`.
334
334
  *
335
- * Workflows without a `searchAttributes` block (or callers passing no
336
- * values) skip the conversion entirely and return `undefined`, matching
337
- * the Temporal SDK's "absent empty" semantics.
335
+ * Use it on the result of `handle.describe()` (or a schedule's describe) to
336
+ * recover the typed shape of indexed attributes. The Temporal SDK only
337
+ * exposes a `.get(key)` accessor on `TypedSearchAttributes` and requires
338
+ * the caller to reconstruct each `SearchAttributeKey` from the contract's
339
+ * declared `kind` — this helper does that lookup once for every declared
340
+ * attribute, returning a `Partial<TypedSearchAttributeMap<TWorkflow>>`
341
+ * (each declared key may or may not have been set on the workflow).
342
+ *
343
+ * Workflows without declared `searchAttributes` get an empty object back.
344
+ *
345
+ * @example
346
+ * ```ts
347
+ * const description = await handle.describe();
348
+ * if (description.isOk()) {
349
+ * const attrs = readTypedSearchAttributes(
350
+ * myContract.workflows.processOrder,
351
+ * description.value.typedSearchAttributes,
352
+ * );
353
+ * // attrs.customerId: string | undefined
354
+ * // attrs.priority: number | undefined
355
+ * }
356
+ * ```
338
357
  */
339
- function toTypedSearchAttributes(workflowDef, values) {
340
- if (!values || !workflowDef.searchAttributes) return void 0;
341
- const pairs = [];
342
- for (const [name, value] of Object.entries(values)) {
343
- if (value === void 0) continue;
344
- const def = workflowDef.searchAttributes[name];
345
- if (!def) continue;
358
+ function readTypedSearchAttributes(workflowDef, instance) {
359
+ const declared = workflowDef.searchAttributes;
360
+ if (!declared) return {};
361
+ const result = {};
362
+ for (const [name, def] of Object.entries(declared)) {
346
363
  const key = (0, _temporalio_common.defineSearchAttributeKey)(name, def.kind);
347
- pairs.push({
348
- key,
349
- value
350
- });
364
+ const value = instance.get(key);
365
+ if (value !== void 0) result[name] = value;
351
366
  }
352
- return pairs.length > 0 ? new _temporalio_common.TypedSearchAttributes(pairs) : void 0;
367
+ return result;
368
+ }
369
+ /**
370
+ * Shared pre-call ritual for the three contract-driven entry points that
371
+ * actually start a workflow (`startWorkflow`, `signalWithStart`,
372
+ * `executeWorkflow`):
373
+ *
374
+ * 1. Look up the workflow definition on the contract.
375
+ * 2. Surface a `WorkflowNotFoundError` if absent.
376
+ * 3. Validate `args` against the workflow's input schema.
377
+ * 4. Surface a `WorkflowValidationError` if validation fails.
378
+ * 5. Translate any caller-supplied `searchAttributes` into Temporal's
379
+ * `TypedSearchAttributes` shape (or `undefined`).
380
+ *
381
+ * `getHandle` deliberately keeps its own three-line lookup — it doesn't
382
+ * accept `args` or `searchAttributes`, so it can't share this helper. The
383
+ * call-specific extras (signal validation, post-call output validation,
384
+ * extended error classification) stay at the call site — those are the
385
+ * differentiators that make each method distinct.
386
+ */
387
+ async function resolveDefinitionAndValidateInput(contract, workflowName, args, searchAttributes) {
388
+ const definition = contract.workflows[workflowName];
389
+ if (!definition) return (0, neverthrow.err)(createWorkflowNotFoundError(workflowName, contract));
390
+ const inputResult = await definition.input["~standard"].validate(args);
391
+ if (inputResult.issues) return (0, neverthrow.err)(createWorkflowValidationError(workflowName, "input", inputResult.issues));
392
+ const searchAttributesResult = toTypedSearchAttributes(definition, workflowName, searchAttributes);
393
+ if (searchAttributesResult.isErr()) return (0, neverthrow.err)(searchAttributesResult.error);
394
+ const typedSearchAttributes = searchAttributesResult.value;
395
+ return (0, neverthrow.ok)({
396
+ definition,
397
+ validatedInput: inputResult.value,
398
+ typedSearchAttributes
399
+ });
353
400
  }
354
401
  /**
355
402
  * Typed Temporal client with neverthrow Result/ResultAsync pattern based on a contract
@@ -435,16 +482,14 @@ var TypedClient = class TypedClient {
435
482
  */
436
483
  startWorkflow(workflowName, { args, searchAttributes, ...temporalOptions }) {
437
484
  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);
485
+ const resolved = await resolveDefinitionAndValidateInput(this.contract, workflowName, args, searchAttributes);
486
+ if (resolved.isErr()) return (0, neverthrow.err)(resolved.error);
487
+ const { definition, validatedInput, typedSearchAttributes } = resolved.value;
443
488
  try {
444
489
  const handle = await this.client.workflow.start(workflowName, {
445
490
  ...temporalOptions,
446
491
  taskQueue: this.contract.taskQueue,
447
- args: [inputResult.value],
492
+ args: [validatedInput],
448
493
  ...typedSearchAttributes ? { typedSearchAttributes } : {}
449
494
  });
450
495
  return (0, neverthrow.ok)(this.createTypedHandle(handle, definition));
@@ -482,20 +527,18 @@ var TypedClient = class TypedClient {
482
527
  */
483
528
  signalWithStart(workflowName, { args, signalName, signalArgs, searchAttributes, ...temporalOptions }) {
484
529
  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));
530
+ const resolved = await resolveDefinitionAndValidateInput(this.contract, workflowName, args, searchAttributes);
531
+ if (resolved.isErr()) return (0, neverthrow.err)(resolved.error);
532
+ const { definition, validatedInput, typedSearchAttributes } = resolved.value;
489
533
  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)}".` }]));
534
+ if (!signalDef) return (0, neverthrow.err)(new SignalValidationError(signalName, [{ message: `Signal "${signalName}" is not declared on workflow "${workflowName}".` }]));
491
535
  const signalInputResult = await signalDef.input["~standard"].validate(signalArgs);
492
536
  if (signalInputResult.issues) return (0, neverthrow.err)(new SignalValidationError(signalName, signalInputResult.issues));
493
- const typedSearchAttributes = toTypedSearchAttributes(definition, searchAttributes);
494
537
  try {
495
538
  const handle = await this.client.workflow.signalWithStart(workflowName, {
496
539
  ...temporalOptions,
497
540
  taskQueue: this.contract.taskQueue,
498
- args: [inputResult.value],
541
+ args: [validatedInput],
499
542
  signal: signalName,
500
543
  signalArgs: [signalInputResult.value],
501
544
  ...typedSearchAttributes ? { typedSearchAttributes } : {}
@@ -530,16 +573,14 @@ var TypedClient = class TypedClient {
530
573
  */
531
574
  executeWorkflow(workflowName, { args, searchAttributes, ...temporalOptions }) {
532
575
  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);
576
+ const resolved = await resolveDefinitionAndValidateInput(this.contract, workflowName, args, searchAttributes);
577
+ if (resolved.isErr()) return (0, neverthrow.err)(resolved.error);
578
+ const { definition, validatedInput, typedSearchAttributes } = resolved.value;
538
579
  try {
539
580
  const result = await this.client.workflow.execute(workflowName, {
540
581
  ...temporalOptions,
541
582
  taskQueue: this.contract.taskQueue,
542
- args: [inputResult.value],
583
+ args: [validatedInput],
543
584
  ...typedSearchAttributes ? { typedSearchAttributes } : {}
544
585
  });
545
586
  const outputResult = await definition.output["~standard"].validate(result);
@@ -684,3 +725,4 @@ exports.WorkflowExecutionNotFoundError = WorkflowExecutionNotFoundError;
684
725
  exports.WorkflowFailedError = WorkflowFailedError;
685
726
  exports.WorkflowNotFoundError = WorkflowNotFoundError;
686
727
  exports.WorkflowValidationError = WorkflowValidationError;
728
+ exports.readTypedSearchAttributes = readTypedSearchAttributes;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,6 @@
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 { ActivityFailure, ApplicationFailure, CancelledFailure, ChildWorkflowFailure, ServerFailure, TerminatedFailure, TimeoutFailure, TypedSearchAttributes } from "@temporalio/common";
3
+ import { ActivityDefinition, AnySchema, AnyWorkflowDefinition, ContractDefinition, QueryDefinition, SearchAttributeDefinition, SearchAttributeKindToType, SignalDefinition, SignalNamesOf, UpdateDefinition } from "@temporal-contract/contract";
3
4
  import { StandardSchemaV1 } from "@standard-schema/spec";
4
5
  import { ResultAsync } from "neverthrow";
5
6
 
@@ -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,10 +231,19 @@ 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
- args: ClientInferInput<TContract["workflows"][TWorkflowName]>; /** Temporal schedule policies (overlap, catchupWindow, pauseOnFailure, etc.). */
237
+ args: ClientInferInput<TContract["workflows"][TWorkflowName]>;
238
+ /**
239
+ * Indexed search attributes for each workflow run spawned by this
240
+ * schedule. Keys and value types are constrained to those declared on
241
+ * the destination workflow's contract via `defineSearchAttribute`.
242
+ * Translated to Temporal's `typedSearchAttributes` and attached to the
243
+ * schedule's `startWorkflow` action so each spawned run is indexed
244
+ * identically to one started directly via `client.startWorkflow`.
245
+ */
246
+ searchAttributes?: TypedSearchAttributeMap<TContract["workflows"][TWorkflowName]>; /** Temporal schedule policies (overlap, catchupWindow, pauseOnFailure, etc.). */
220
247
  policies?: ScheduleOptions["policies"]; /** Temporal schedule state (paused, note, limited, etc.). */
221
248
  state?: ScheduleOptions["state"]; /** Schedule-level memo (non-indexed metadata on the schedule itself). */
222
249
  memo?: ScheduleOptions["memo"];
@@ -261,7 +288,7 @@ declare class TypedScheduleClient<TContract extends ContractDefinition> {
261
288
  * `workflowType` are pulled from the contract automatically; the typed
262
289
  * options shape omits them so call sites don't have to repeat themselves.
263
290
  */
264
- create<TWorkflowName extends keyof TContract["workflows"]>(workflowName: TWorkflowName, options: TypedScheduleCreateOptions<TContract, TWorkflowName>): ResultAsync<TypedScheduleHandle, WorkflowNotFoundError | WorkflowValidationError | RuntimeClientError>;
291
+ create<TWorkflowName extends keyof TContract["workflows"] & string>(workflowName: TWorkflowName, options: TypedScheduleCreateOptions<TContract, TWorkflowName>): ResultAsync<TypedScheduleHandle, WorkflowNotFoundError | WorkflowValidationError | RuntimeClientError>;
265
292
  /**
266
293
  * Get a typed handle to an existing schedule. Does not validate that the
267
294
  * schedule exists — handle methods (`describe`, `pause`, etc.) will
@@ -282,8 +309,38 @@ declare class TypedScheduleClient<TContract extends ContractDefinition> {
282
309
  * meaning the `searchAttributes` field is effectively absent from the start
283
310
  * options for that workflow.
284
311
  */
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"> & {
312
+ type TypedSearchAttributeMap<TWorkflow extends AnyWorkflowDefinition> = TWorkflow["searchAttributes"] extends Record<string, SearchAttributeDefinition> ? { [K in keyof TWorkflow["searchAttributes"]]?: SearchAttributeKindToType<TWorkflow["searchAttributes"][K]["kind"]> } : never;
313
+ /**
314
+ * Read declared search attributes off a `TypedSearchAttributes` instance —
315
+ * the read-side counterpart to the write-side `searchAttributes` option on
316
+ * `startWorkflow` / `signalWithStart` / `executeWorkflow` /
317
+ * `schedule.create`.
318
+ *
319
+ * Use it on the result of `handle.describe()` (or a schedule's describe) to
320
+ * recover the typed shape of indexed attributes. The Temporal SDK only
321
+ * exposes a `.get(key)` accessor on `TypedSearchAttributes` and requires
322
+ * the caller to reconstruct each `SearchAttributeKey` from the contract's
323
+ * declared `kind` — this helper does that lookup once for every declared
324
+ * attribute, returning a `Partial<TypedSearchAttributeMap<TWorkflow>>`
325
+ * (each declared key may or may not have been set on the workflow).
326
+ *
327
+ * Workflows without declared `searchAttributes` get an empty object back.
328
+ *
329
+ * @example
330
+ * ```ts
331
+ * const description = await handle.describe();
332
+ * if (description.isOk()) {
333
+ * const attrs = readTypedSearchAttributes(
334
+ * myContract.workflows.processOrder,
335
+ * description.value.typedSearchAttributes,
336
+ * );
337
+ * // attrs.customerId: string | undefined
338
+ * // attrs.priority: number | undefined
339
+ * }
340
+ * ```
341
+ */
342
+ declare function readTypedSearchAttributes<TWorkflow extends AnyWorkflowDefinition>(workflowDef: TWorkflow, instance: TypedSearchAttributes): Partial<TypedSearchAttributeMap<TWorkflow>>;
343
+ type TypedWorkflowStartOptions<TContract extends ContractDefinition, TWorkflowName extends keyof TContract["workflows"] & string> = Omit<WorkflowStartOptions, "taskQueue" | "args" | "searchAttributes" | "typedSearchAttributes"> & {
287
344
  args: ClientInferInput<TContract["workflows"][TWorkflowName]>;
288
345
  /**
289
346
  * Indexed search attributes for the started workflow. Keys and value types
@@ -297,7 +354,7 @@ type TypedWorkflowStartOptions<TContract extends ContractDefinition, TWorkflowNa
297
354
  * Options for {@link TypedClient.signalWithStart} — typed against both the
298
355
  * workflow's input schema and the named signal's input schema.
299
356
  */
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"> & {
357
+ 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
358
  args: ClientInferInput<TContract["workflows"][TWorkflowName]>;
302
359
  signalName: TSignalName;
303
360
  signalArgs: TContract["workflows"][TWorkflowName]["signals"][TSignalName] extends SignalDefinition ? ClientInferInput<TContract["workflows"][TWorkflowName]["signals"][TSignalName]> : never;
@@ -314,7 +371,7 @@ type TypedSignalWithStartOptions<TContract extends ContractDefinition, TWorkflow
314
371
  * to the standard handle so callers can correlate the signal with the
315
372
  * (possibly pre-existing) workflow execution chain.
316
373
  */
317
- type TypedWorkflowHandleWithSignaledRunId<TWorkflow extends WorkflowDefinition> = TypedWorkflowHandle<TWorkflow> & {
374
+ type TypedWorkflowHandleWithSignaledRunId<TWorkflow extends AnyWorkflowDefinition> = TypedWorkflowHandle<TWorkflow> & {
318
375
  /**
319
376
  * The Run Id of the bound Workflow at the time of `signalWithStart`. Since
320
377
  * `signalWithStart` may have signaled an existing Workflow Chain, this is
@@ -325,7 +382,7 @@ type TypedWorkflowHandleWithSignaledRunId<TWorkflow extends WorkflowDefinition>
325
382
  /**
326
383
  * Typed workflow handle with validated results using neverthrow Result/ResultAsync
327
384
  */
328
- type TypedWorkflowHandle<TWorkflow extends WorkflowDefinition> = {
385
+ type TypedWorkflowHandle<TWorkflow extends AnyWorkflowDefinition> = {
329
386
  workflowId: string;
330
387
  /**
331
388
  * Type-safe queries based on workflow definition with Result pattern
@@ -440,7 +497,7 @@ declare class TypedClient<TContract extends ContractDefinition> {
440
497
  * );
441
498
  * ```
442
499
  */
443
- startWorkflow<TWorkflowName extends keyof TContract["workflows"]>(workflowName: TWorkflowName, {
500
+ startWorkflow<TWorkflowName extends keyof TContract["workflows"] & string>(workflowName: TWorkflowName, {
444
501
  args,
445
502
  searchAttributes,
446
503
  ...temporalOptions
@@ -471,7 +528,7 @@ declare class TypedClient<TContract extends ContractDefinition> {
471
528
  * );
472
529
  * ```
473
530
  */
474
- signalWithStart<TWorkflowName extends keyof TContract["workflows"], TSignalName extends keyof TContract["workflows"][TWorkflowName]["signals"] & string>(workflowName: TWorkflowName, {
531
+ signalWithStart<TWorkflowName extends keyof TContract["workflows"] & string, TSignalName extends SignalNamesOf<TContract["workflows"][TWorkflowName]>>(workflowName: TWorkflowName, {
475
532
  args,
476
533
  signalName,
477
534
  signalArgs,
@@ -496,7 +553,7 @@ declare class TypedClient<TContract extends ContractDefinition> {
496
553
  * );
497
554
  * ```
498
555
  */
499
- executeWorkflow<TWorkflowName extends keyof TContract["workflows"]>(workflowName: TWorkflowName, {
556
+ executeWorkflow<TWorkflowName extends keyof TContract["workflows"] & string>(workflowName: TWorkflowName, {
500
557
  args,
501
558
  searchAttributes,
502
559
  ...temporalOptions
@@ -516,9 +573,9 @@ declare class TypedClient<TContract extends ContractDefinition> {
516
573
  * );
517
574
  * ```
518
575
  */
519
- getHandle<TWorkflowName extends keyof TContract["workflows"]>(workflowName: TWorkflowName, workflowId: string): ResultAsync<TypedWorkflowHandle<TContract["workflows"][TWorkflowName]>, WorkflowNotFoundError | RuntimeClientError>;
576
+ getHandle<TWorkflowName extends keyof TContract["workflows"] & string>(workflowName: TWorkflowName, workflowId: string): ResultAsync<TypedWorkflowHandle<TContract["workflows"][TWorkflowName]>, WorkflowNotFoundError | RuntimeClientError>;
520
577
  private createTypedHandle;
521
578
  }
522
579
  //#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 };
580
+ 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 TypedSearchAttributeMap, type TypedSignalWithStartOptions, type TypedWorkflowHandle, type TypedWorkflowHandleWithSignaledRunId, type TypedWorkflowStartOptions, UpdateValidationError, WorkflowAlreadyStartedError, WorkflowExecutionNotFoundError, WorkflowFailedError, WorkflowNotFoundError, WorkflowValidationError, readTypedSearchAttributes };
524
581
  //# 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,CAAiB,WAAA,CAChF,CAAA;;;;;;AADF;;;KAaY,mBAAA,mBAAsC,kBAAA,KAChD,IAAA,EAAM,gBAAA,CAAiB,SAAA,MACpB,OAAA,CAAQ,iBAAA,CAAkB,SAAA;;;;;KAMnB,mBAAA,mBAAsC,kBAAA,KAChD,IAAA,EAAM,gBAAA,CAAiB,SAAA,MACpB,OAAA,CAAQ,iBAAA,CAAkB,SAAA;;;;;KAMnB,iBAAA,iBAAkC,gBAAA,KAC5C,IAAA,EAAM,gBAAA,CAAiB,OAAA,MACpB,WAAA,OAAkB,KAAA;;;AAlBvB;;KAwBY,gBAAA,gBAAgC,eAAA,KAC1C,IAAA,EAAM,gBAAA,CAAiB,MAAA,MACpB,WAAA,CAAY,iBAAA,CAAkB,MAAA,GAAS,KAAA;;;;;KAMhC,iBAAA,iBAAkC,gBA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,6BAC8B,SAAA,yCACF,SAAA,cAAuB,aAAA,sBAAA,CAEjD,YAAA,EAAc,aAAA;IAEZ,IAAA;IACA,UAAA;IACA,UAAA;IACA,gBAAA;IAAA,GACG;EAAA,GACF,2BAAA,CAA4B,SAAA,EAAW,aAAA,EAAe,WAAA,IACxD,WAAA,CACD,oCAAA,CAAqC,SAAA,cAAuB,aAAA,IAC1D,qBAAA,GACA,uBAAA,GACA,qBAAA,GACA,2BAAA,GACA,kBAAA;EHnVqE;;AAO3E;;;;;;;;;;;;;;;;EGiaE,eAAA,6BAA4C,SAAA,cAAA,CAC1C,YAAA,EAAc,aAAA;IAEZ,IAAA;IACA,gBAAA;IAAA,GACG;EAAA,GACF,yBAAA,CAA0B,SAAA,EAAW,aAAA,IACvC,WAAA,CACD,iBAAA,CAAkB,SAAA,cAAuB,aAAA,IACvC,qBAAA,GACA,uBAAA,GACA,2BAAA,GACA,mBAAA,GACA,8BAAA,GACA,kBAAA;EH9agC;;;;;;;;AAStC;;;;;;;EG0fE,SAAA,6BAAsC,SAAA,cAAA,CACpC,YAAA,EAAc,aAAA,EACd,UAAA,WACC,WAAA,CACD,mBAAA,CAAoB,SAAA,cAAuB,aAAA,IAC3C,qBAAA,GAAwB,kBAAA;EAAA,QAoBlB,iBAAA;AAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/errors.ts","../src/schedule.ts","../src/client.ts"],"mappings":";;;;;;;;;;;KAgBY,gBAAA;EAA6B,KAAA,EAAO,SAAA;AAAA,KAAe,gBAAA,CAAiB,UAAA,CAC9E,CAAA;;;;;KAOU,iBAAA;EAA8B,MAAA,EAAQ,SAAA;AAAA,KAAe,gBAAA,CAAiB,WAAA,CAChF,CAAA;;;;;;;AADF;;KAaY,mBAAA,mBAAsC,qBAAA,KAChD,IAAA,EAAM,gBAAA,CAAiB,SAAA,MACpB,OAAA,CAAQ,iBAAA,CAAkB,SAAA;;;;;KAMnB,mBAAA,mBAAsC,kBAAA,K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