@hatchet-dev/typescript-sdk 0.12.5 → 0.13.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/step.js CHANGED
@@ -225,7 +225,7 @@ class Context {
225
225
  const name = this.client.config.namespace + workflowName;
226
226
  let key = '';
227
227
  let sticky = false;
228
- let metadata = undefined;
228
+ let metadata;
229
229
  if (typeof options === 'string') {
230
230
  this.logger.warn('Using key param is deprecated and will be removed in a future release. Use options.key instead.');
231
231
  key = options;
package/workflow.d.ts CHANGED
@@ -69,14 +69,17 @@ export declare const WorkflowConcurrency: z.ZodObject<{
69
69
  name: z.ZodString;
70
70
  maxRuns: z.ZodOptional<z.ZodNumber>;
71
71
  limitStrategy: z.ZodOptional<z.ZodNativeEnum<typeof PbConcurrencyLimitStrategy>>;
72
+ expression: z.ZodOptional<z.ZodString>;
72
73
  }, "strip", z.ZodTypeAny, {
73
74
  name: string;
74
75
  maxRuns?: number | undefined;
75
76
  limitStrategy?: PbConcurrencyLimitStrategy | undefined;
77
+ expression?: string | undefined;
76
78
  }, {
77
79
  name: string;
78
80
  maxRuns?: number | undefined;
79
81
  limitStrategy?: PbConcurrencyLimitStrategy | undefined;
82
+ expression?: string | undefined;
80
83
  }>;
81
84
  export declare const HatchetTimeoutSchema: z.ZodString;
82
85
  export declare const StickyStrategy: typeof PbStickyStrategy;
@@ -331,7 +334,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
331
334
  }>;
332
335
  export interface Workflow extends z.infer<typeof CreateWorkflowSchema> {
333
336
  concurrency?: z.infer<typeof WorkflowConcurrency> & {
334
- key: (ctx: any) => string;
337
+ key?: (ctx: any) => string;
335
338
  };
336
339
  steps: CreateStep<any, any>[];
337
340
  onFailure?: CreateStep<any, any>;
package/workflow.js CHANGED
@@ -42,6 +42,7 @@ exports.WorkflowConcurrency = z.object({
42
42
  name: z.string(),
43
43
  maxRuns: z.number().optional(),
44
44
  limitStrategy: z.nativeEnum(exports.ConcurrencyLimitStrategy).optional(),
45
+ expression: z.string().optional(),
45
46
  });
46
47
  exports.HatchetTimeoutSchema = z.string();
47
48
  exports.StickyStrategy = workflows_1.StickyStrategy;