@hatchet-dev/typescript-sdk 0.6.0 → 0.6.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hatchet-dev/typescript-sdk",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Background task orchestration & visibility for developers",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -14,6 +14,10 @@ export declare enum RateLimitDuration {
14
14
  SECOND = 0,
15
15
  MINUTE = 1,
16
16
  HOUR = 2,
17
+ DAY = 3,
18
+ WEEK = 4,
19
+ MONTH = 5,
20
+ YEAR = 6,
17
21
  UNRECOGNIZED = -1
18
22
  }
19
23
  export declare function rateLimitDurationFromJSON(object: any): RateLimitDuration;
@@ -77,6 +77,10 @@ var RateLimitDuration;
77
77
  RateLimitDuration[RateLimitDuration["SECOND"] = 0] = "SECOND";
78
78
  RateLimitDuration[RateLimitDuration["MINUTE"] = 1] = "MINUTE";
79
79
  RateLimitDuration[RateLimitDuration["HOUR"] = 2] = "HOUR";
80
+ RateLimitDuration[RateLimitDuration["DAY"] = 3] = "DAY";
81
+ RateLimitDuration[RateLimitDuration["WEEK"] = 4] = "WEEK";
82
+ RateLimitDuration[RateLimitDuration["MONTH"] = 5] = "MONTH";
83
+ RateLimitDuration[RateLimitDuration["YEAR"] = 6] = "YEAR";
80
84
  RateLimitDuration[RateLimitDuration["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
81
85
  })(RateLimitDuration || (exports.RateLimitDuration = RateLimitDuration = {}));
82
86
  function rateLimitDurationFromJSON(object) {
@@ -90,6 +94,18 @@ function rateLimitDurationFromJSON(object) {
90
94
  case 2:
91
95
  case 'HOUR':
92
96
  return RateLimitDuration.HOUR;
97
+ case 3:
98
+ case 'DAY':
99
+ return RateLimitDuration.DAY;
100
+ case 4:
101
+ case 'WEEK':
102
+ return RateLimitDuration.WEEK;
103
+ case 5:
104
+ case 'MONTH':
105
+ return RateLimitDuration.MONTH;
106
+ case 6:
107
+ case 'YEAR':
108
+ return RateLimitDuration.YEAR;
93
109
  case -1:
94
110
  case 'UNRECOGNIZED':
95
111
  default:
@@ -105,6 +121,14 @@ function rateLimitDurationToJSON(object) {
105
121
  return 'MINUTE';
106
122
  case RateLimitDuration.HOUR:
107
123
  return 'HOUR';
124
+ case RateLimitDuration.DAY:
125
+ return 'DAY';
126
+ case RateLimitDuration.WEEK:
127
+ return 'WEEK';
128
+ case RateLimitDuration.MONTH:
129
+ return 'MONTH';
130
+ case RateLimitDuration.YEAR:
131
+ return 'YEAR';
108
132
  case RateLimitDuration.UNRECOGNIZED:
109
133
  default:
110
134
  return 'UNRECOGNIZED';
package/step.d.ts CHANGED
@@ -87,7 +87,7 @@ export declare class Context<T, K> {
87
87
  playground(name: string, defaultValue?: string): string;
88
88
  log(message: string, level?: LogLevel): void;
89
89
  putStream(data: string | Uint8Array): Promise<void>;
90
- spawnWorkflow<P = unknown>(workflowName: string, input: T, key?: string): ChildWorkflowRef<P>;
90
+ spawnWorkflow<P = unknown, Q = unknown>(workflowName: string, input: Q, key?: string): ChildWorkflowRef<P>;
91
91
  }
92
92
  export type StepRunFunction<T, K> = (ctx: Context<T, K>) => Promise<NextStep> | NextStep | void;
93
93
  export interface CreateStep<T, K> extends z.infer<typeof CreateStepSchema> {