@wenlarge/communication 1.1.6 → 1.1.8

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.
@@ -18,6 +18,7 @@ export interface WorkflowResponse {
18
18
  projectId: string;
19
19
  createdAt: string;
20
20
  updatedAt: string;
21
+ status: WorkflowStatus;
21
22
  }
22
23
  export interface DeleteWorkflowRequest {
23
24
  id: string;
@@ -148,6 +149,31 @@ export interface UpdateWorkflowStatusRequest {
148
149
  workflowId: string;
149
150
  status: WorkflowStatus;
150
151
  }
152
+ export interface GetNodeExecutionLogRequest {
153
+ nodeId: string;
154
+ workflowId: string;
155
+ }
156
+ export interface GetExecutionLogResponse {
157
+ logs: ExecutionLogEntry[];
158
+ }
159
+ export interface GetWorkflowExecutionLogRequest {
160
+ workflowId: string;
161
+ }
162
+ export interface ExecutionLogEntry {
163
+ nodeId: string;
164
+ status: string;
165
+ inputSchema?: {
166
+ [key: string]: any;
167
+ } | undefined;
168
+ outputSchema?: {
169
+ [key: string]: any;
170
+ } | undefined;
171
+ config?: {
172
+ [key: string]: any;
173
+ } | undefined;
174
+ startedAt: string;
175
+ finishedAt: string;
176
+ }
151
177
  export declare const WORKFLOW_PACKAGE_NAME = "workflow";
152
178
  export interface WorkflowServiceClient {
153
179
  create(request: CreateWorkflowRequest, metadata?: Metadata): Observable<WorkflowResponse>;
@@ -165,6 +191,8 @@ export interface WorkflowServiceClient {
165
191
  findWorkflowNodeTypes(request: Empty, metadata?: Metadata): Observable<FindManyWorkflowNodeTypeResponse>;
166
192
  findConnections(request: FindConnectionsRequest, metadata?: Metadata): Observable<FindConnectionsResponse>;
167
193
  updateWorkflowStatus(request: UpdateWorkflowStatusRequest, metadata?: Metadata): Observable<Empty>;
194
+ getNodeExecutionLog(request: GetNodeExecutionLogRequest, metadata?: Metadata): Observable<GetExecutionLogResponse>;
195
+ getWorkflowExecutionLog(request: GetWorkflowExecutionLogRequest, metadata?: Metadata): Observable<GetExecutionLogResponse>;
168
196
  }
169
197
  export interface WorkflowServiceController {
170
198
  create(request: CreateWorkflowRequest, metadata?: Metadata): Promise<WorkflowResponse> | Observable<WorkflowResponse> | WorkflowResponse;
@@ -182,6 +210,8 @@ export interface WorkflowServiceController {
182
210
  findWorkflowNodeTypes(request: Empty, metadata?: Metadata): Promise<FindManyWorkflowNodeTypeResponse> | Observable<FindManyWorkflowNodeTypeResponse> | FindManyWorkflowNodeTypeResponse;
183
211
  findConnections(request: FindConnectionsRequest, metadata?: Metadata): Promise<FindConnectionsResponse> | Observable<FindConnectionsResponse> | FindConnectionsResponse;
184
212
  updateWorkflowStatus(request: UpdateWorkflowStatusRequest, metadata?: Metadata): void;
213
+ getNodeExecutionLog(request: GetNodeExecutionLogRequest, metadata?: Metadata): Promise<GetExecutionLogResponse> | Observable<GetExecutionLogResponse> | GetExecutionLogResponse;
214
+ getWorkflowExecutionLog(request: GetWorkflowExecutionLogRequest, metadata?: Metadata): Promise<GetExecutionLogResponse> | Observable<GetExecutionLogResponse> | GetExecutionLogResponse;
185
215
  }
186
216
  export declare function WorkflowServiceControllerMethods(): (constructor: Function) => void;
187
217
  export declare const WORKFLOW_SERVICE_NAME = "WorkflowService";
@@ -37,6 +37,8 @@ function WorkflowServiceControllerMethods() {
37
37
  "findWorkflowNodeTypes",
38
38
  "findConnections",
39
39
  "updateWorkflowStatus",
40
+ "getNodeExecutionLog",
41
+ "getWorkflowExecutionLog",
40
42
  ];
41
43
  for (const method of grpcMethods) {
42
44
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -1 +1,2 @@
1
1
  export declare function unwrapStruct(fields: Record<string, any>): Record<string, any>;
2
+ export declare function wrapStruct(obj: any): any;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.unwrapStruct = unwrapStruct;
4
+ exports.wrapStruct = wrapStruct;
5
+ const struct_1 = require("../generated/google/protobuf/struct");
4
6
  function unwrapStruct(fields) {
5
7
  var _a, _b;
6
8
  const result = {};
@@ -21,3 +23,8 @@ function unwrapStruct(fields) {
21
23
  }
22
24
  return result;
23
25
  }
26
+ function wrapStruct(obj) {
27
+ if (!obj)
28
+ return undefined;
29
+ return struct_1.Struct.wrap(obj);
30
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenlarge/communication",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "Shared gRPC proto interfaces and generated clients for Wenlarge microservices.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,4 +16,5 @@ message ExecuteNodeResponse {
16
16
 
17
17
  service CoreExecutionService {
18
18
  rpc ExecuteNode (ExecuteNodeRequest) returns (ExecuteNodeResponse);
19
+
19
20
  }
@@ -21,6 +21,8 @@ service WorkflowService {
21
21
  rpc FindWorkflowNodeTypes (google.protobuf.Empty) returns (FindManyWorkflowNodeTypeResponse);
22
22
  rpc FindConnections (FindConnectionsRequest) returns (FindConnectionsResponse);
23
23
  rpc UpdateWorkflowStatus (UpdateWorkflowStatusRequest) returns (google.protobuf.Empty);
24
+ rpc GetNodeExecutionLog(GetNodeExecutionLogRequest) returns (GetExecutionLogResponse);
25
+ rpc GetWorkflowExecutionLog(GetWorkflowExecutionLogRequest) returns (GetExecutionLogResponse);
24
26
  }
25
27
 
26
28
  message CreateWorkflowRequest {
@@ -35,6 +37,7 @@ message WorkflowResponse {
35
37
  string projectId = 4;
36
38
  string createdAt = 5;
37
39
  string updatedAt = 6;
40
+ WorkflowStatus status = 7;
38
41
  }
39
42
 
40
43
  message DeleteWorkflowRequest{
@@ -171,4 +174,27 @@ enum WorkflowStatus {
171
174
  message UpdateWorkflowStatusRequest {
172
175
  string workflowId = 1;
173
176
  WorkflowStatus status = 2;
177
+ }
178
+
179
+ message GetNodeExecutionLogRequest {
180
+ string nodeId = 1;
181
+ string workflowId =2;
182
+ }
183
+
184
+ message GetExecutionLogResponse {
185
+ repeated ExecutionLogEntry logs = 1;
186
+ }
187
+
188
+ message GetWorkflowExecutionLogRequest{
189
+ string workflowId = 1;
190
+ }
191
+
192
+ message ExecutionLogEntry {
193
+ string nodeId = 1;
194
+ string status = 2;
195
+ google.protobuf.Struct inputSchema = 3;
196
+ google.protobuf.Struct outputSchema = 4;
197
+ google.protobuf.Struct config = 5;
198
+ string startedAt = 6;
199
+ string finishedAt = 7;
174
200
  }
@@ -32,6 +32,7 @@ export interface WorkflowResponse {
32
32
  projectId: string;
33
33
  createdAt: string;
34
34
  updatedAt: string;
35
+ status: WorkflowStatus;
35
36
  }
36
37
 
37
38
  export interface DeleteWorkflowRequest {
@@ -165,6 +166,29 @@ export interface UpdateWorkflowStatusRequest {
165
166
  status: WorkflowStatus;
166
167
  }
167
168
 
169
+ export interface GetNodeExecutionLogRequest {
170
+ nodeId: string;
171
+ workflowId: string;
172
+ }
173
+
174
+ export interface GetExecutionLogResponse {
175
+ logs: ExecutionLogEntry[];
176
+ }
177
+
178
+ export interface GetWorkflowExecutionLogRequest {
179
+ workflowId: string;
180
+ }
181
+
182
+ export interface ExecutionLogEntry {
183
+ nodeId: string;
184
+ status: string;
185
+ inputSchema?: { [key: string]: any } | undefined;
186
+ outputSchema?: { [key: string]: any } | undefined;
187
+ config?: { [key: string]: any } | undefined;
188
+ startedAt: string;
189
+ finishedAt: string;
190
+ }
191
+
168
192
  export const WORKFLOW_PACKAGE_NAME = "workflow";
169
193
 
170
194
  wrappers[".google.protobuf.Struct"] = { fromObject: Struct.wrap, toObject: Struct.unwrap } as any;
@@ -205,6 +229,13 @@ export interface WorkflowServiceClient {
205
229
  findConnections(request: FindConnectionsRequest, metadata?: Metadata): Observable<FindConnectionsResponse>;
206
230
 
207
231
  updateWorkflowStatus(request: UpdateWorkflowStatusRequest, metadata?: Metadata): Observable<Empty>;
232
+
233
+ getNodeExecutionLog(request: GetNodeExecutionLogRequest, metadata?: Metadata): Observable<GetExecutionLogResponse>;
234
+
235
+ getWorkflowExecutionLog(
236
+ request: GetWorkflowExecutionLogRequest,
237
+ metadata?: Metadata,
238
+ ): Observable<GetExecutionLogResponse>;
208
239
  }
209
240
 
210
241
  export interface WorkflowServiceController {
@@ -267,6 +298,16 @@ export interface WorkflowServiceController {
267
298
  ): Promise<FindConnectionsResponse> | Observable<FindConnectionsResponse> | FindConnectionsResponse;
268
299
 
269
300
  updateWorkflowStatus(request: UpdateWorkflowStatusRequest, metadata?: Metadata): void;
301
+
302
+ getNodeExecutionLog(
303
+ request: GetNodeExecutionLogRequest,
304
+ metadata?: Metadata,
305
+ ): Promise<GetExecutionLogResponse> | Observable<GetExecutionLogResponse> | GetExecutionLogResponse;
306
+
307
+ getWorkflowExecutionLog(
308
+ request: GetWorkflowExecutionLogRequest,
309
+ metadata?: Metadata,
310
+ ): Promise<GetExecutionLogResponse> | Observable<GetExecutionLogResponse> | GetExecutionLogResponse;
270
311
  }
271
312
 
272
313
  export function WorkflowServiceControllerMethods() {
@@ -287,6 +328,8 @@ export function WorkflowServiceControllerMethods() {
287
328
  "findWorkflowNodeTypes",
288
329
  "findConnections",
289
330
  "updateWorkflowStatus",
331
+ "getNodeExecutionLog",
332
+ "getWorkflowExecutionLog",
290
333
  ];
291
334
  for (const method of grpcMethods) {
292
335
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);