@hatchet-dev/typescript-sdk 0.0.3 → 0.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/clients/admin/admin-client.d.ts +1 -3
- package/dist/clients/admin/admin-client.js +1 -4
- package/dist/clients/dispatcher/action-listener.d.ts +2 -0
- package/dist/clients/dispatcher/dispatcher-client.d.ts +6 -3
- package/dist/clients/dispatcher/dispatcher-client.js +15 -3
- package/dist/clients/event/event-client.d.ts +2 -0
- package/dist/clients/event/event-client.js +5 -1
- package/dist/clients/hatchet-client/hatchet-client.js +1 -1
- package/dist/clients/worker/worker.d.ts +11 -8
- package/dist/clients/worker/worker.js +114 -25
- package/dist/package.json +73 -0
- package/dist/protoc/dispatcher/dispatcher.d.ts +82 -22
- package/dist/protoc/dispatcher/dispatcher.js +292 -58
- package/dist/protoc/workflows/workflows.d.ts +26 -0
- package/dist/protoc/workflows/workflows.js +138 -1
- package/dist/step.d.ts +3 -0
- package/dist/step.js +2 -0
- package/dist/workflow.d.ts +33 -0
- package/dist/workflow.js +11 -1
- package/package.json +5 -2
|
@@ -4,19 +4,29 @@ export declare const protobufPackage = "";
|
|
|
4
4
|
export declare enum ActionType {
|
|
5
5
|
START_STEP_RUN = 0,
|
|
6
6
|
CANCEL_STEP_RUN = 1,
|
|
7
|
+
START_GET_GROUP_KEY = 2,
|
|
7
8
|
UNRECOGNIZED = -1
|
|
8
9
|
}
|
|
9
10
|
export declare function actionTypeFromJSON(object: any): ActionType;
|
|
10
11
|
export declare function actionTypeToJSON(object: ActionType): string;
|
|
11
|
-
export declare enum
|
|
12
|
+
export declare enum GroupKeyActionEventType {
|
|
13
|
+
GROUP_KEY_EVENT_TYPE_UNKNOWN = 0,
|
|
14
|
+
GROUP_KEY_EVENT_TYPE_STARTED = 1,
|
|
15
|
+
GROUP_KEY_EVENT_TYPE_COMPLETED = 2,
|
|
16
|
+
GROUP_KEY_EVENT_TYPE_FAILED = 3,
|
|
17
|
+
UNRECOGNIZED = -1
|
|
18
|
+
}
|
|
19
|
+
export declare function groupKeyActionEventTypeFromJSON(object: any): GroupKeyActionEventType;
|
|
20
|
+
export declare function groupKeyActionEventTypeToJSON(object: GroupKeyActionEventType): string;
|
|
21
|
+
export declare enum StepActionEventType {
|
|
12
22
|
STEP_EVENT_TYPE_UNKNOWN = 0,
|
|
13
23
|
STEP_EVENT_TYPE_STARTED = 1,
|
|
14
24
|
STEP_EVENT_TYPE_COMPLETED = 2,
|
|
15
25
|
STEP_EVENT_TYPE_FAILED = 3,
|
|
16
26
|
UNRECOGNIZED = -1
|
|
17
27
|
}
|
|
18
|
-
export declare function
|
|
19
|
-
export declare function
|
|
28
|
+
export declare function stepActionEventTypeFromJSON(object: any): StepActionEventType;
|
|
29
|
+
export declare function stepActionEventTypeToJSON(object: StepActionEventType): string;
|
|
20
30
|
export interface WorkerRegisterRequest {
|
|
21
31
|
/** the name of the worker */
|
|
22
32
|
workerName: string;
|
|
@@ -36,6 +46,10 @@ export interface WorkerRegisterResponse {
|
|
|
36
46
|
export interface AssignedAction {
|
|
37
47
|
/** the tenant id */
|
|
38
48
|
tenantId: string;
|
|
49
|
+
/** the workflow run id (optional) */
|
|
50
|
+
workflowRunId: string;
|
|
51
|
+
/** the get group key run id (optional) */
|
|
52
|
+
getGroupKeyRunId: string;
|
|
39
53
|
/** the job id */
|
|
40
54
|
jobId: string;
|
|
41
55
|
/** the job name */
|
|
@@ -67,7 +81,21 @@ export interface WorkerUnsubscribeResponse {
|
|
|
67
81
|
/** the id of the worker */
|
|
68
82
|
workerId: string;
|
|
69
83
|
}
|
|
70
|
-
export interface
|
|
84
|
+
export interface GroupKeyActionEvent {
|
|
85
|
+
/** the id of the worker */
|
|
86
|
+
workerId: string;
|
|
87
|
+
/** the id of the job */
|
|
88
|
+
workflowRunId: string;
|
|
89
|
+
getGroupKeyRunId: string;
|
|
90
|
+
/** the action id */
|
|
91
|
+
actionId: string;
|
|
92
|
+
eventTimestamp: Date | undefined;
|
|
93
|
+
/** the step event type */
|
|
94
|
+
eventType: GroupKeyActionEventType;
|
|
95
|
+
/** the event payload */
|
|
96
|
+
eventPayload: string;
|
|
97
|
+
}
|
|
98
|
+
export interface StepActionEvent {
|
|
71
99
|
/** the id of the worker */
|
|
72
100
|
workerId: string;
|
|
73
101
|
/** the id of the job */
|
|
@@ -82,7 +110,7 @@ export interface ActionEvent {
|
|
|
82
110
|
actionId: string;
|
|
83
111
|
eventTimestamp: Date | undefined;
|
|
84
112
|
/** the step event type */
|
|
85
|
-
eventType:
|
|
113
|
+
eventType: StepActionEventType;
|
|
86
114
|
/** the event payload */
|
|
87
115
|
eventPayload: string;
|
|
88
116
|
}
|
|
@@ -140,13 +168,21 @@ export declare const WorkerUnsubscribeResponse: {
|
|
|
140
168
|
create(base?: DeepPartial<WorkerUnsubscribeResponse>): WorkerUnsubscribeResponse;
|
|
141
169
|
fromPartial(object: DeepPartial<WorkerUnsubscribeResponse>): WorkerUnsubscribeResponse;
|
|
142
170
|
};
|
|
143
|
-
export declare const
|
|
144
|
-
encode(message:
|
|
145
|
-
decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
146
|
-
fromJSON(object: any):
|
|
147
|
-
toJSON(message:
|
|
148
|
-
create(base?: DeepPartial<
|
|
149
|
-
fromPartial(object: DeepPartial<
|
|
171
|
+
export declare const GroupKeyActionEvent: {
|
|
172
|
+
encode(message: GroupKeyActionEvent, writer?: _m0.Writer): _m0.Writer;
|
|
173
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GroupKeyActionEvent;
|
|
174
|
+
fromJSON(object: any): GroupKeyActionEvent;
|
|
175
|
+
toJSON(message: GroupKeyActionEvent): unknown;
|
|
176
|
+
create(base?: DeepPartial<GroupKeyActionEvent>): GroupKeyActionEvent;
|
|
177
|
+
fromPartial(object: DeepPartial<GroupKeyActionEvent>): GroupKeyActionEvent;
|
|
178
|
+
};
|
|
179
|
+
export declare const StepActionEvent: {
|
|
180
|
+
encode(message: StepActionEvent, writer?: _m0.Writer): _m0.Writer;
|
|
181
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): StepActionEvent;
|
|
182
|
+
fromJSON(object: any): StepActionEvent;
|
|
183
|
+
toJSON(message: StepActionEvent): unknown;
|
|
184
|
+
create(base?: DeepPartial<StepActionEvent>): StepActionEvent;
|
|
185
|
+
fromPartial(object: DeepPartial<StepActionEvent>): StepActionEvent;
|
|
150
186
|
};
|
|
151
187
|
export declare const ActionEventResponse: {
|
|
152
188
|
encode(message: ActionEventResponse, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -205,15 +241,37 @@ export declare const DispatcherDefinition: {
|
|
|
205
241
|
readonly responseStream: true;
|
|
206
242
|
readonly options: {};
|
|
207
243
|
};
|
|
208
|
-
readonly
|
|
209
|
-
readonly name: "
|
|
244
|
+
readonly sendStepActionEvent: {
|
|
245
|
+
readonly name: "SendStepActionEvent";
|
|
246
|
+
readonly requestType: {
|
|
247
|
+
encode(message: StepActionEvent, writer?: _m0.Writer): _m0.Writer;
|
|
248
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): StepActionEvent;
|
|
249
|
+
fromJSON(object: any): StepActionEvent;
|
|
250
|
+
toJSON(message: StepActionEvent): unknown;
|
|
251
|
+
create(base?: DeepPartial<StepActionEvent>): StepActionEvent;
|
|
252
|
+
fromPartial(object: DeepPartial<StepActionEvent>): StepActionEvent;
|
|
253
|
+
};
|
|
254
|
+
readonly requestStream: false;
|
|
255
|
+
readonly responseType: {
|
|
256
|
+
encode(message: ActionEventResponse, writer?: _m0.Writer): _m0.Writer;
|
|
257
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ActionEventResponse;
|
|
258
|
+
fromJSON(object: any): ActionEventResponse;
|
|
259
|
+
toJSON(message: ActionEventResponse): unknown;
|
|
260
|
+
create(base?: DeepPartial<ActionEventResponse>): ActionEventResponse;
|
|
261
|
+
fromPartial(object: DeepPartial<ActionEventResponse>): ActionEventResponse;
|
|
262
|
+
};
|
|
263
|
+
readonly responseStream: false;
|
|
264
|
+
readonly options: {};
|
|
265
|
+
};
|
|
266
|
+
readonly sendGroupKeyActionEvent: {
|
|
267
|
+
readonly name: "SendGroupKeyActionEvent";
|
|
210
268
|
readonly requestType: {
|
|
211
|
-
encode(message:
|
|
212
|
-
decode(input: _m0.Reader | Uint8Array, length?: number):
|
|
213
|
-
fromJSON(object: any):
|
|
214
|
-
toJSON(message:
|
|
215
|
-
create(base?: DeepPartial<
|
|
216
|
-
fromPartial(object: DeepPartial<
|
|
269
|
+
encode(message: GroupKeyActionEvent, writer?: _m0.Writer): _m0.Writer;
|
|
270
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GroupKeyActionEvent;
|
|
271
|
+
fromJSON(object: any): GroupKeyActionEvent;
|
|
272
|
+
toJSON(message: GroupKeyActionEvent): unknown;
|
|
273
|
+
create(base?: DeepPartial<GroupKeyActionEvent>): GroupKeyActionEvent;
|
|
274
|
+
fromPartial(object: DeepPartial<GroupKeyActionEvent>): GroupKeyActionEvent;
|
|
217
275
|
};
|
|
218
276
|
readonly requestStream: false;
|
|
219
277
|
readonly responseType: {
|
|
@@ -254,13 +312,15 @@ export declare const DispatcherDefinition: {
|
|
|
254
312
|
export interface DispatcherServiceImplementation<CallContextExt = {}> {
|
|
255
313
|
register(request: WorkerRegisterRequest, context: CallContext & CallContextExt): Promise<DeepPartial<WorkerRegisterResponse>>;
|
|
256
314
|
listen(request: WorkerListenRequest, context: CallContext & CallContextExt): ServerStreamingMethodResult<DeepPartial<AssignedAction>>;
|
|
257
|
-
|
|
315
|
+
sendStepActionEvent(request: StepActionEvent, context: CallContext & CallContextExt): Promise<DeepPartial<ActionEventResponse>>;
|
|
316
|
+
sendGroupKeyActionEvent(request: GroupKeyActionEvent, context: CallContext & CallContextExt): Promise<DeepPartial<ActionEventResponse>>;
|
|
258
317
|
unsubscribe(request: WorkerUnsubscribeRequest, context: CallContext & CallContextExt): Promise<DeepPartial<WorkerUnsubscribeResponse>>;
|
|
259
318
|
}
|
|
260
319
|
export interface DispatcherClient<CallOptionsExt = {}> {
|
|
261
320
|
register(request: DeepPartial<WorkerRegisterRequest>, options?: CallOptions & CallOptionsExt): Promise<WorkerRegisterResponse>;
|
|
262
321
|
listen(request: DeepPartial<WorkerListenRequest>, options?: CallOptions & CallOptionsExt): AsyncIterable<AssignedAction>;
|
|
263
|
-
|
|
322
|
+
sendStepActionEvent(request: DeepPartial<StepActionEvent>, options?: CallOptions & CallOptionsExt): Promise<ActionEventResponse>;
|
|
323
|
+
sendGroupKeyActionEvent(request: DeepPartial<GroupKeyActionEvent>, options?: CallOptions & CallOptionsExt): Promise<ActionEventResponse>;
|
|
264
324
|
unsubscribe(request: DeepPartial<WorkerUnsubscribeRequest>, options?: CallOptions & CallOptionsExt): Promise<WorkerUnsubscribeResponse>;
|
|
265
325
|
}
|
|
266
326
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|