@wenlarge/communication 1.1.2 → 1.1.4

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.
@@ -1,17 +1,25 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v1.181.2
4
- // protoc v6.33.2
4
+ // protoc v5.29.6
5
5
  // source: workflow.proto
6
6
 
7
7
  /* eslint-disable */
8
8
  import { Metadata } from "@grpc/grpc-js";
9
9
  import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
10
+ import { wrappers } from "protobufjs";
10
11
  import { Observable } from "rxjs";
11
12
  import { Empty } from "./google/protobuf/empty";
13
+ import { Struct } from "./google/protobuf/struct";
12
14
 
13
15
  export const protobufPackage = "workflow";
14
16
 
17
+ export enum WorkflowStatus {
18
+ DRAFT = "DRAFT",
19
+ PUBLISHED = "PUBLISHED",
20
+ UNRECOGNIZED = "UNRECOGNIZED",
21
+ }
22
+
15
23
  export interface CreateWorkflowRequest {
16
24
  name: string;
17
25
  projectId: string;
@@ -46,37 +54,43 @@ export interface FindManyWorkflowResponse {
46
54
  total: number;
47
55
  }
48
56
 
49
- export interface TriggerExecutionRequest {
57
+ export interface TriggerWorkflowRequest {
58
+ workflowId: string;
59
+ }
60
+
61
+ export interface TriggerWorkflowResponse {
62
+ ok: boolean;
63
+ }
64
+
65
+ export interface TriggerNodeRequest {
50
66
  nodeId: string;
51
67
  }
52
68
 
53
- export interface TriggerExecutionResponse {
69
+ export interface TriggerNodeResponse {
54
70
  ok: boolean;
55
71
  }
56
72
 
57
- /** NODE SERVICE COMPS */
58
73
  export interface CreateWorkflowNodeRequest {
59
74
  workflowId: string;
60
75
  name: string;
61
- type: string;
62
76
  positionX: number;
63
77
  positionY: number;
64
- inputSchema: string;
65
- outputSchema: string;
66
- config: string;
67
- nextNodeIds: string[];
78
+ inputSchema?: { [key: string]: any } | undefined;
79
+ outputSchema?: { [key: string]: any } | undefined;
80
+ config?: { [key: string]: any } | undefined;
81
+ nodeTypeId: string;
68
82
  }
69
83
 
70
84
  export interface UpdateWorkflowNodeRequest {
71
85
  id: string;
72
86
  name: string;
73
- type: string;
87
+ nodeTypeId: string;
74
88
  positionX: number;
75
89
  positionY: number;
76
- nextNodeIds: string[];
77
- inputSchema: string;
78
- outputSchema: string;
79
- config: string;
90
+ inputSchema?: { [key: string]: any } | undefined;
91
+ outputSchema?: { [key: string]: any } | undefined;
92
+ config?: { [key: string]: any } | undefined;
93
+ workflowId: string;
80
94
  }
81
95
 
82
96
  export interface DeleteWorkflowNodeRequest {
@@ -105,19 +119,65 @@ export interface FindFirstWorkflowNodeResponse {
105
119
  export interface WorkflowNodeResponse {
106
120
  id: string;
107
121
  name: string;
108
- type: string;
122
+ nodeTypeId: string;
109
123
  positionX: number;
110
124
  positionY: number;
111
- inputSchema: string;
112
- outputSchema: string;
113
- config: string;
114
- nextNodeIds: string[];
125
+ inputSchema?: { [key: string]: any } | undefined;
126
+ outputSchema?: { [key: string]: any } | undefined;
127
+ config?: { [key: string]: any } | undefined;
115
128
  createdAt: string;
116
129
  updatedAt: string;
130
+ workflowId: string;
131
+ }
132
+
133
+ export interface WorkflowNodeConnection {
134
+ id: string;
135
+ workflowId: string;
136
+ fromNodeId: string;
137
+ toNodeId: string;
138
+ }
139
+
140
+ export interface SaveWorkflowBatchRequest {
141
+ workflowId: string;
142
+ nodes: UpdateWorkflowNodeRequest[];
143
+ connections: UpdateBatchConnection[];
144
+ }
145
+
146
+ export interface UpdateBatchConnection {
147
+ fromNodeId: string;
148
+ toNodeId: string;
149
+ }
150
+
151
+ export interface WorkflowNodeTypeResponse {
152
+ id: string;
153
+ label: string;
154
+ description: string;
155
+ service: string;
156
+ icon: string;
157
+ form: string;
158
+ }
159
+
160
+ export interface FindManyWorkflowNodeTypeResponse {
161
+ data: WorkflowNodeTypeResponse[];
162
+ }
163
+
164
+ export interface FindConnectionsRequest {
165
+ workflowId: string;
166
+ }
167
+
168
+ export interface FindConnectionsResponse {
169
+ data: WorkflowNodeConnection[];
170
+ }
171
+
172
+ export interface UpdateWorkflowStatusRequest {
173
+ workflowId: string;
174
+ status: WorkflowStatus;
117
175
  }
118
176
 
119
177
  export const WORKFLOW_PACKAGE_NAME = "workflow";
120
178
 
179
+ wrappers[".google.protobuf.Struct"] = { fromObject: Struct.wrap, toObject: Struct.unwrap } as any;
180
+
121
181
  export interface WorkflowServiceClient {
122
182
  create(request: CreateWorkflowRequest, metadata?: Metadata): Observable<WorkflowResponse>;
123
183
 
@@ -127,7 +187,9 @@ export interface WorkflowServiceClient {
127
187
 
128
188
  update(request: UpdateWorkflowRequest, metadata?: Metadata): Observable<WorkflowResponse>;
129
189
 
130
- triggerWorkflow(request: TriggerExecutionRequest, metadata?: Metadata): Observable<TriggerExecutionResponse>;
190
+ triggerWorkflow(request: TriggerWorkflowRequest, metadata?: Metadata): Observable<TriggerWorkflowResponse>;
191
+
192
+ triggerNode(request: TriggerNodeRequest, metadata?: Metadata): Observable<TriggerNodeResponse>;
131
193
 
132
194
  createWorkflowNode(request: CreateWorkflowNodeRequest, metadata?: Metadata): Observable<WorkflowNodeResponse>;
133
195
 
@@ -144,6 +206,14 @@ export interface WorkflowServiceClient {
144
206
  updateWorkflowNode(request: UpdateWorkflowNodeRequest, metadata?: Metadata): Observable<WorkflowNodeResponse>;
145
207
 
146
208
  deleteWorkflowNode(request: DeleteWorkflowNodeRequest, metadata?: Metadata): Observable<Empty>;
209
+
210
+ saveWorkflowBatch(request: SaveWorkflowBatchRequest, metadata?: Metadata): Observable<Empty>;
211
+
212
+ findWorkflowNodeTypes(request: Empty, metadata?: Metadata): Observable<FindManyWorkflowNodeTypeResponse>;
213
+
214
+ findConnections(request: FindConnectionsRequest, metadata?: Metadata): Observable<FindConnectionsResponse>;
215
+
216
+ updateWorkflowStatus(request: UpdateWorkflowStatusRequest, metadata?: Metadata): Observable<Empty>;
147
217
  }
148
218
 
149
219
  export interface WorkflowServiceController {
@@ -165,9 +235,14 @@ export interface WorkflowServiceController {
165
235
  ): Promise<WorkflowResponse> | Observable<WorkflowResponse> | WorkflowResponse;
166
236
 
167
237
  triggerWorkflow(
168
- request: TriggerExecutionRequest,
238
+ request: TriggerWorkflowRequest,
169
239
  metadata?: Metadata,
170
- ): Promise<TriggerExecutionResponse> | Observable<TriggerExecutionResponse> | TriggerExecutionResponse;
240
+ ): Promise<TriggerWorkflowResponse> | Observable<TriggerWorkflowResponse> | TriggerWorkflowResponse;
241
+
242
+ triggerNode(
243
+ request: TriggerNodeRequest,
244
+ metadata?: Metadata,
245
+ ): Promise<TriggerNodeResponse> | Observable<TriggerNodeResponse> | TriggerNodeResponse;
171
246
 
172
247
  createWorkflowNode(
173
248
  request: CreateWorkflowNodeRequest,
@@ -190,6 +265,23 @@ export interface WorkflowServiceController {
190
265
  ): Promise<WorkflowNodeResponse> | Observable<WorkflowNodeResponse> | WorkflowNodeResponse;
191
266
 
192
267
  deleteWorkflowNode(request: DeleteWorkflowNodeRequest, metadata?: Metadata): void;
268
+
269
+ saveWorkflowBatch(request: SaveWorkflowBatchRequest, metadata?: Metadata): void;
270
+
271
+ findWorkflowNodeTypes(
272
+ request: Empty,
273
+ metadata?: Metadata,
274
+ ):
275
+ | Promise<FindManyWorkflowNodeTypeResponse>
276
+ | Observable<FindManyWorkflowNodeTypeResponse>
277
+ | FindManyWorkflowNodeTypeResponse;
278
+
279
+ findConnections(
280
+ request: FindConnectionsRequest,
281
+ metadata?: Metadata,
282
+ ): Promise<FindConnectionsResponse> | Observable<FindConnectionsResponse> | FindConnectionsResponse;
283
+
284
+ updateWorkflowStatus(request: UpdateWorkflowStatusRequest, metadata?: Metadata): void;
193
285
  }
194
286
 
195
287
  export function WorkflowServiceControllerMethods() {
@@ -200,11 +292,16 @@ export function WorkflowServiceControllerMethods() {
200
292
  "delete",
201
293
  "update",
202
294
  "triggerWorkflow",
295
+ "triggerNode",
203
296
  "createWorkflowNode",
204
297
  "findManyWorkflowNode",
205
298
  "findFirstWorkflowNode",
206
299
  "updateWorkflowNode",
207
300
  "deleteWorkflowNode",
301
+ "saveWorkflowBatch",
302
+ "findWorkflowNodeTypes",
303
+ "findConnections",
304
+ "updateWorkflowStatus",
208
305
  ];
209
306
  for (const method of grpcMethods) {
210
307
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -1 +0,0 @@
1
- export declare const WORKFLOW_NODE_PROTO_PATH: string[];
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WORKFLOW_NODE_PROTO_PATH = void 0;
4
- exports.WORKFLOW_NODE_PROTO_PATH = [
5
- 'proto/workflow-node.proto',
6
- ];