@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.
@@ -0,0 +1 @@
1
+ export declare const EXECUTOR_CORE_PROTO_PATH: string[];
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EXECUTOR_CORE_PROTO_PATH = void 0;
4
+ exports.EXECUTOR_CORE_PROTO_PATH = ["proto/executor-core.proto"];
@@ -53,6 +53,23 @@ export interface GetMeResponse {
53
53
  updatedAt: string;
54
54
  companyUsersOnUser: CompanyUser[];
55
55
  }
56
+ export interface GetCompanyUsersRequest {
57
+ companyId: string;
58
+ }
59
+ export interface CompanyUserDetail {
60
+ userId: string;
61
+ userName: string;
62
+ userEmail: string;
63
+ joinedAt: string;
64
+ isOwner: boolean;
65
+ }
66
+ export interface GetCompanyUsersResponse {
67
+ users: CompanyUserDetail[];
68
+ }
69
+ export interface RemoveUserFromCompanyRequest {
70
+ companyId: string;
71
+ userId: string;
72
+ }
56
73
  export declare const AUTH_PACKAGE_NAME = "auth";
57
74
  export interface AuthServiceClient {
58
75
  login(request: LoginRequest, metadata?: Metadata): Observable<LoginResponse>;
@@ -60,6 +77,8 @@ export interface AuthServiceClient {
60
77
  getMe(request: GetMeRequest, metadata?: Metadata): Observable<GetMeResponse>;
61
78
  inviteToCompany(request: InviteToCompanyRequest, metadata?: Metadata): Observable<InviteToCompanyResponse>;
62
79
  updateInviteStatus(request: UpdateInviteStatusRequest, metadata?: Metadata): Observable<UpdateInviteStatusResponse>;
80
+ getCompanyUsers(request: GetCompanyUsersRequest, metadata?: Metadata): Observable<GetCompanyUsersResponse>;
81
+ removeUserFromCompany(request: RemoveUserFromCompanyRequest, metadata?: Metadata): Observable<Empty>;
63
82
  }
64
83
  export interface AuthServiceController {
65
84
  login(request: LoginRequest, metadata?: Metadata): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
@@ -67,6 +86,8 @@ export interface AuthServiceController {
67
86
  getMe(request: GetMeRequest, metadata?: Metadata): Promise<GetMeResponse> | Observable<GetMeResponse> | GetMeResponse;
68
87
  inviteToCompany(request: InviteToCompanyRequest, metadata?: Metadata): Promise<InviteToCompanyResponse> | Observable<InviteToCompanyResponse> | InviteToCompanyResponse;
69
88
  updateInviteStatus(request: UpdateInviteStatusRequest, metadata?: Metadata): Promise<UpdateInviteStatusResponse> | Observable<UpdateInviteStatusResponse> | UpdateInviteStatusResponse;
89
+ getCompanyUsers(request: GetCompanyUsersRequest, metadata?: Metadata): Promise<GetCompanyUsersResponse> | Observable<GetCompanyUsersResponse> | GetCompanyUsersResponse;
90
+ removeUserFromCompany(request: RemoveUserFromCompanyRequest, metadata?: Metadata): void;
70
91
  }
71
92
  export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
72
93
  export declare const AUTH_SERVICE_NAME = "AuthService";
@@ -2,7 +2,7 @@
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
4
  // protoc-gen-ts_proto v1.181.2
5
- // protoc v6.33.2
5
+ // protoc v5.29.6
6
6
  // source: auth.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.AUTH_SERVICE_NAME = exports.AUTH_PACKAGE_NAME = exports.protobufPackage = void 0;
@@ -12,7 +12,15 @@ exports.protobufPackage = "auth";
12
12
  exports.AUTH_PACKAGE_NAME = "auth";
13
13
  function AuthServiceControllerMethods() {
14
14
  return function (constructor) {
15
- const grpcMethods = ["login", "register", "getMe", "inviteToCompany", "updateInviteStatus"];
15
+ const grpcMethods = [
16
+ "login",
17
+ "register",
18
+ "getMe",
19
+ "inviteToCompany",
20
+ "updateInviteStatus",
21
+ "getCompanyUsers",
22
+ "removeUserFromCompany",
23
+ ];
16
24
  for (const method of grpcMethods) {
17
25
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
18
26
  (0, microservices_1.GrpcMethod)("AuthService", method)(constructor.prototype[method], method, descriptor);
@@ -0,0 +1,25 @@
1
+ import { Metadata } from "@grpc/grpc-js";
2
+ import { Observable } from "rxjs";
3
+ export declare const protobufPackage = "executor_core";
4
+ export interface ExecuteNodeRequest {
5
+ nodeTypeId: string;
6
+ nodeId: string;
7
+ config?: {
8
+ [key: string]: any;
9
+ } | undefined;
10
+ inputSchema?: {
11
+ [key: string]: any;
12
+ } | undefined;
13
+ }
14
+ export interface ExecuteNodeResponse {
15
+ lastResult: string;
16
+ }
17
+ export declare const EXECUTOR_CORE_PACKAGE_NAME = "executor_core";
18
+ export interface CoreExecutionServiceClient {
19
+ executeNode(request: ExecuteNodeRequest, metadata?: Metadata): Observable<ExecuteNodeResponse>;
20
+ }
21
+ export interface CoreExecutionServiceController {
22
+ executeNode(request: ExecuteNodeRequest, metadata?: Metadata): Promise<ExecuteNodeResponse> | Observable<ExecuteNodeResponse> | ExecuteNodeResponse;
23
+ }
24
+ export declare function CoreExecutionServiceControllerMethods(): (constructor: Function) => void;
25
+ export declare const CORE_EXECUTION_SERVICE_NAME = "CoreExecutionService";
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v1.181.2
5
+ // protoc v5.29.6
6
+ // source: executor-core.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.CORE_EXECUTION_SERVICE_NAME = exports.EXECUTOR_CORE_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.CoreExecutionServiceControllerMethods = CoreExecutionServiceControllerMethods;
10
+ const microservices_1 = require("@nestjs/microservices");
11
+ const protobufjs_1 = require("protobufjs");
12
+ const struct_1 = require("./google/protobuf/struct");
13
+ exports.protobufPackage = "executor_core";
14
+ exports.EXECUTOR_CORE_PACKAGE_NAME = "executor_core";
15
+ protobufjs_1.wrappers[".google.protobuf.Struct"] = { fromObject: struct_1.Struct.wrap, toObject: struct_1.Struct.unwrap };
16
+ function CoreExecutionServiceControllerMethods() {
17
+ return function (constructor) {
18
+ const grpcMethods = ["executeNode"];
19
+ for (const method of grpcMethods) {
20
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
21
+ (0, microservices_1.GrpcMethod)("CoreExecutionService", method)(constructor.prototype[method], method, descriptor);
22
+ }
23
+ const grpcStreamMethods = [];
24
+ for (const method of grpcStreamMethods) {
25
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
26
+ (0, microservices_1.GrpcStreamMethod)("CoreExecutionService", method)(constructor.prototype[method], method, descriptor);
27
+ }
28
+ };
29
+ }
30
+ exports.CORE_EXECUTION_SERVICE_NAME = "CoreExecutionService";
@@ -2,7 +2,7 @@
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
4
  // protoc-gen-ts_proto v1.181.2
5
- // protoc v6.33.2
5
+ // protoc v5.29.6
6
6
  // source: google/protobuf/empty.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.GOOGLE_PROTOBUF_PACKAGE_NAME = exports.protobufPackage = void 0;
@@ -0,0 +1,82 @@
1
+ export declare const protobufPackage = "google.protobuf";
2
+ /**
3
+ * `NullValue` is a singleton enumeration to represent the null value for the
4
+ * `Value` type union.
5
+ *
6
+ * The JSON representation for `NullValue` is JSON `null`.
7
+ */
8
+ export declare enum NullValue {
9
+ /** NULL_VALUE - Null value. */
10
+ NULL_VALUE = "NULL_VALUE",
11
+ UNRECOGNIZED = "UNRECOGNIZED"
12
+ }
13
+ /**
14
+ * `Struct` represents a structured data value, consisting of fields
15
+ * which map to dynamically typed values. In some languages, `Struct`
16
+ * might be supported by a native representation. For example, in
17
+ * scripting languages like JS a struct is represented as an
18
+ * object. The details of that representation are described together
19
+ * with the proto support for the language.
20
+ *
21
+ * The JSON representation for `Struct` is JSON object.
22
+ */
23
+ export interface Struct {
24
+ /** Unordered map of dynamically typed values. */
25
+ fields: {
26
+ [key: string]: any | undefined;
27
+ };
28
+ }
29
+ export interface Struct_FieldsEntry {
30
+ key: string;
31
+ value?: any | undefined;
32
+ }
33
+ /**
34
+ * `Value` represents a dynamically typed value which can be either
35
+ * null, a number, a string, a boolean, a recursive struct value, or a
36
+ * list of values. A producer of value is expected to set one of these
37
+ * variants. Absence of any variant indicates an error.
38
+ *
39
+ * The JSON representation for `Value` is JSON value.
40
+ */
41
+ export interface Value {
42
+ /** Represents a null value. */
43
+ nullValue?: NullValue | undefined;
44
+ /** Represents a double value. */
45
+ numberValue?: number | undefined;
46
+ /** Represents a string value. */
47
+ stringValue?: string | undefined;
48
+ /** Represents a boolean value. */
49
+ boolValue?: boolean | undefined;
50
+ /** Represents a structured value. */
51
+ structValue?: {
52
+ [key: string]: any;
53
+ } | undefined;
54
+ /** Represents a repeated `Value`. */
55
+ listValue?: Array<any> | undefined;
56
+ }
57
+ /**
58
+ * `ListValue` is a wrapper around a repeated field of values.
59
+ *
60
+ * The JSON representation for `ListValue` is JSON array.
61
+ */
62
+ export interface ListValue {
63
+ /** Repeated field of dynamically typed values. */
64
+ values: any[];
65
+ }
66
+ export declare const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
67
+ export declare const Struct: {
68
+ wrap(object: {
69
+ [key: string]: any;
70
+ } | undefined): Struct;
71
+ unwrap(message: Struct): {
72
+ [key: string]: any;
73
+ };
74
+ };
75
+ export declare const Value: {
76
+ wrap(value: any): Value;
77
+ unwrap(message: any): string | number | boolean | Object | null | Array<any> | undefined;
78
+ };
79
+ export declare const ListValue: {
80
+ wrap(array: Array<any> | undefined): ListValue;
81
+ unwrap(message: ListValue): Array<any>;
82
+ };
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v1.181.2
5
+ // protoc v5.29.6
6
+ // source: google/protobuf/struct.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ListValue = exports.Value = exports.Struct = exports.GOOGLE_PROTOBUF_PACKAGE_NAME = exports.NullValue = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ const protobufjs_1 = require("protobufjs");
11
+ exports.protobufPackage = "google.protobuf";
12
+ /**
13
+ * `NullValue` is a singleton enumeration to represent the null value for the
14
+ * `Value` type union.
15
+ *
16
+ * The JSON representation for `NullValue` is JSON `null`.
17
+ */
18
+ var NullValue;
19
+ (function (NullValue) {
20
+ /** NULL_VALUE - Null value. */
21
+ NullValue["NULL_VALUE"] = "NULL_VALUE";
22
+ NullValue["UNRECOGNIZED"] = "UNRECOGNIZED";
23
+ })(NullValue || (exports.NullValue = NullValue = {}));
24
+ exports.GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
25
+ function createBaseStruct() {
26
+ return { fields: {} };
27
+ }
28
+ exports.Struct = {
29
+ wrap(object) {
30
+ const struct = createBaseStruct();
31
+ if (object !== undefined) {
32
+ for (const key of Object.keys(object)) {
33
+ struct.fields[key] = exports.Value.wrap(object[key]);
34
+ }
35
+ }
36
+ return struct;
37
+ },
38
+ unwrap(message) {
39
+ const object = {};
40
+ if (message.fields) {
41
+ for (const key of Object.keys(message.fields)) {
42
+ object[key] = exports.Value.unwrap(message.fields[key]);
43
+ }
44
+ }
45
+ return object;
46
+ },
47
+ };
48
+ function createBaseValue() {
49
+ return {};
50
+ }
51
+ exports.Value = {
52
+ wrap(value) {
53
+ const result = {};
54
+ if (value === null) {
55
+ result.nullValue = NullValue.NULL_VALUE;
56
+ }
57
+ else if (typeof value === "boolean") {
58
+ result.boolValue = value;
59
+ }
60
+ else if (typeof value === "number") {
61
+ result.numberValue = value;
62
+ }
63
+ else if (typeof value === "string") {
64
+ result.stringValue = value;
65
+ }
66
+ else if (globalThis.Array.isArray(value)) {
67
+ result.listValue = exports.ListValue.wrap(value);
68
+ }
69
+ else if (typeof value === "object") {
70
+ result.structValue = exports.Struct.wrap(value);
71
+ }
72
+ else if (typeof value !== "undefined") {
73
+ throw new globalThis.Error("Unsupported any value type: " + typeof value);
74
+ }
75
+ return result;
76
+ },
77
+ unwrap(message) {
78
+ if ((message === null || message === void 0 ? void 0 : message.hasOwnProperty("stringValue")) && message.stringValue !== undefined) {
79
+ return message.stringValue;
80
+ }
81
+ else if ((message === null || message === void 0 ? void 0 : message.hasOwnProperty("numberValue")) && (message === null || message === void 0 ? void 0 : message.numberValue) !== undefined) {
82
+ return message.numberValue;
83
+ }
84
+ else if ((message === null || message === void 0 ? void 0 : message.hasOwnProperty("boolValue")) && (message === null || message === void 0 ? void 0 : message.boolValue) !== undefined) {
85
+ return message.boolValue;
86
+ }
87
+ else if ((message === null || message === void 0 ? void 0 : message.hasOwnProperty("structValue")) && (message === null || message === void 0 ? void 0 : message.structValue) !== undefined) {
88
+ return exports.Struct.unwrap(message.structValue);
89
+ }
90
+ else if ((message === null || message === void 0 ? void 0 : message.hasOwnProperty("listValue")) && (message === null || message === void 0 ? void 0 : message.listValue) !== undefined) {
91
+ return exports.ListValue.unwrap(message.listValue);
92
+ }
93
+ else if ((message === null || message === void 0 ? void 0 : message.hasOwnProperty("nullValue")) && (message === null || message === void 0 ? void 0 : message.nullValue) !== undefined) {
94
+ return null;
95
+ }
96
+ return undefined;
97
+ },
98
+ };
99
+ function createBaseListValue() {
100
+ return { values: [] };
101
+ }
102
+ exports.ListValue = {
103
+ wrap(array) {
104
+ const result = createBaseListValue();
105
+ result.values = (array !== null && array !== void 0 ? array : []).map(exports.Value.wrap);
106
+ return result;
107
+ },
108
+ unwrap(message) {
109
+ if ((message === null || message === void 0 ? void 0 : message.hasOwnProperty("values")) && globalThis.Array.isArray(message.values)) {
110
+ return message.values.map(exports.Value.unwrap);
111
+ }
112
+ else {
113
+ return message;
114
+ }
115
+ },
116
+ };
117
+ protobufjs_1.wrappers[".google.protobuf.Struct"] = { fromObject: exports.Struct.wrap, toObject: exports.Struct.unwrap };
@@ -2,7 +2,7 @@
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
4
  // protoc-gen-ts_proto v1.181.2
5
- // protoc v6.33.2
5
+ // protoc v5.29.6
6
6
  // source: project.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.PROJECT_SERVICE_NAME = exports.PROJECT_PACKAGE_NAME = exports.protobufPackage = void 0;
@@ -2,6 +2,11 @@ import { Metadata } from "@grpc/grpc-js";
2
2
  import { Observable } from "rxjs";
3
3
  import { Empty } from "./google/protobuf/empty";
4
4
  export declare const protobufPackage = "workflow";
5
+ export declare enum WorkflowStatus {
6
+ DRAFT = "DRAFT",
7
+ PUBLISHED = "PUBLISHED",
8
+ UNRECOGNIZED = "UNRECOGNIZED"
9
+ }
5
10
  export interface CreateWorkflowRequest {
6
11
  name: string;
7
12
  projectId: string;
@@ -30,34 +35,50 @@ export interface FindManyWorkflowResponse {
30
35
  data: WorkflowResponse[];
31
36
  total: number;
32
37
  }
33
- export interface TriggerExecutionRequest {
38
+ export interface TriggerWorkflowRequest {
39
+ workflowId: string;
40
+ }
41
+ export interface TriggerWorkflowResponse {
42
+ ok: boolean;
43
+ }
44
+ export interface TriggerNodeRequest {
34
45
  nodeId: string;
35
46
  }
36
- export interface TriggerExecutionResponse {
47
+ export interface TriggerNodeResponse {
37
48
  ok: boolean;
38
49
  }
39
- /** NODE SERVICE COMPS */
40
50
  export interface CreateWorkflowNodeRequest {
41
51
  workflowId: string;
42
52
  name: string;
43
- type: string;
44
53
  positionX: number;
45
54
  positionY: number;
46
- inputSchema: string;
47
- outputSchema: string;
48
- config: string;
49
- nextNodeIds: string[];
55
+ inputSchema?: {
56
+ [key: string]: any;
57
+ } | undefined;
58
+ outputSchema?: {
59
+ [key: string]: any;
60
+ } | undefined;
61
+ config?: {
62
+ [key: string]: any;
63
+ } | undefined;
64
+ nodeTypeId: string;
50
65
  }
51
66
  export interface UpdateWorkflowNodeRequest {
52
67
  id: string;
53
68
  name: string;
54
- type: string;
69
+ nodeTypeId: string;
55
70
  positionX: number;
56
71
  positionY: number;
57
- nextNodeIds: string[];
58
- inputSchema: string;
59
- outputSchema: string;
60
- config: string;
72
+ inputSchema?: {
73
+ [key: string]: any;
74
+ } | undefined;
75
+ outputSchema?: {
76
+ [key: string]: any;
77
+ } | undefined;
78
+ config?: {
79
+ [key: string]: any;
80
+ } | undefined;
81
+ workflowId: string;
61
82
  }
62
83
  export interface DeleteWorkflowNodeRequest {
63
84
  id: string;
@@ -80,15 +101,57 @@ export interface FindFirstWorkflowNodeResponse {
80
101
  export interface WorkflowNodeResponse {
81
102
  id: string;
82
103
  name: string;
83
- type: string;
104
+ nodeTypeId: string;
84
105
  positionX: number;
85
106
  positionY: number;
86
- inputSchema: string;
87
- outputSchema: string;
88
- config: string;
89
- nextNodeIds: string[];
107
+ inputSchema?: {
108
+ [key: string]: any;
109
+ } | undefined;
110
+ outputSchema?: {
111
+ [key: string]: any;
112
+ } | undefined;
113
+ config?: {
114
+ [key: string]: any;
115
+ } | undefined;
90
116
  createdAt: string;
91
117
  updatedAt: string;
118
+ workflowId: string;
119
+ }
120
+ export interface WorkflowNodeConnection {
121
+ id: string;
122
+ workflowId: string;
123
+ fromNodeId: string;
124
+ toNodeId: string;
125
+ }
126
+ export interface SaveWorkflowBatchRequest {
127
+ workflowId: string;
128
+ nodes: UpdateWorkflowNodeRequest[];
129
+ connections: UpdateBatchConnection[];
130
+ }
131
+ export interface UpdateBatchConnection {
132
+ fromNodeId: string;
133
+ toNodeId: string;
134
+ }
135
+ export interface WorkflowNodeTypeResponse {
136
+ id: string;
137
+ label: string;
138
+ description: string;
139
+ service: string;
140
+ icon: string;
141
+ form: string;
142
+ }
143
+ export interface FindManyWorkflowNodeTypeResponse {
144
+ data: WorkflowNodeTypeResponse[];
145
+ }
146
+ export interface FindConnectionsRequest {
147
+ workflowId: string;
148
+ }
149
+ export interface FindConnectionsResponse {
150
+ data: WorkflowNodeConnection[];
151
+ }
152
+ export interface UpdateWorkflowStatusRequest {
153
+ workflowId: string;
154
+ status: WorkflowStatus;
92
155
  }
93
156
  export declare const WORKFLOW_PACKAGE_NAME = "workflow";
94
157
  export interface WorkflowServiceClient {
@@ -96,24 +159,34 @@ export interface WorkflowServiceClient {
96
159
  findMany(request: FindManyWorkflowRequest, metadata?: Metadata): Observable<FindManyWorkflowResponse>;
97
160
  delete(request: DeleteWorkflowRequest, metadata?: Metadata): Observable<Empty>;
98
161
  update(request: UpdateWorkflowRequest, metadata?: Metadata): Observable<WorkflowResponse>;
99
- triggerWorkflow(request: TriggerExecutionRequest, metadata?: Metadata): Observable<TriggerExecutionResponse>;
162
+ triggerWorkflow(request: TriggerWorkflowRequest, metadata?: Metadata): Observable<TriggerWorkflowResponse>;
163
+ triggerNode(request: TriggerNodeRequest, metadata?: Metadata): Observable<TriggerNodeResponse>;
100
164
  createWorkflowNode(request: CreateWorkflowNodeRequest, metadata?: Metadata): Observable<WorkflowNodeResponse>;
101
165
  findManyWorkflowNode(request: FindManyWorkflowNodeRequest, metadata?: Metadata): Observable<FindManyWorkflowNodeResponse>;
102
166
  findFirstWorkflowNode(request: FindFirstWorkflowNodeRequest, metadata?: Metadata): Observable<FindFirstWorkflowNodeResponse>;
103
167
  updateWorkflowNode(request: UpdateWorkflowNodeRequest, metadata?: Metadata): Observable<WorkflowNodeResponse>;
104
168
  deleteWorkflowNode(request: DeleteWorkflowNodeRequest, metadata?: Metadata): Observable<Empty>;
169
+ saveWorkflowBatch(request: SaveWorkflowBatchRequest, metadata?: Metadata): Observable<Empty>;
170
+ findWorkflowNodeTypes(request: Empty, metadata?: Metadata): Observable<FindManyWorkflowNodeTypeResponse>;
171
+ findConnections(request: FindConnectionsRequest, metadata?: Metadata): Observable<FindConnectionsResponse>;
172
+ updateWorkflowStatus(request: UpdateWorkflowStatusRequest, metadata?: Metadata): Observable<Empty>;
105
173
  }
106
174
  export interface WorkflowServiceController {
107
175
  create(request: CreateWorkflowRequest, metadata?: Metadata): Promise<WorkflowResponse> | Observable<WorkflowResponse> | WorkflowResponse;
108
176
  findMany(request: FindManyWorkflowRequest, metadata?: Metadata): Promise<FindManyWorkflowResponse> | Observable<FindManyWorkflowResponse> | FindManyWorkflowResponse;
109
177
  delete(request: DeleteWorkflowRequest, metadata?: Metadata): void;
110
178
  update(request: UpdateWorkflowRequest, metadata?: Metadata): Promise<WorkflowResponse> | Observable<WorkflowResponse> | WorkflowResponse;
111
- triggerWorkflow(request: TriggerExecutionRequest, metadata?: Metadata): Promise<TriggerExecutionResponse> | Observable<TriggerExecutionResponse> | TriggerExecutionResponse;
179
+ triggerWorkflow(request: TriggerWorkflowRequest, metadata?: Metadata): Promise<TriggerWorkflowResponse> | Observable<TriggerWorkflowResponse> | TriggerWorkflowResponse;
180
+ triggerNode(request: TriggerNodeRequest, metadata?: Metadata): Promise<TriggerNodeResponse> | Observable<TriggerNodeResponse> | TriggerNodeResponse;
112
181
  createWorkflowNode(request: CreateWorkflowNodeRequest, metadata?: Metadata): Promise<WorkflowNodeResponse> | Observable<WorkflowNodeResponse> | WorkflowNodeResponse;
113
182
  findManyWorkflowNode(request: FindManyWorkflowNodeRequest, metadata?: Metadata): Promise<FindManyWorkflowNodeResponse> | Observable<FindManyWorkflowNodeResponse> | FindManyWorkflowNodeResponse;
114
183
  findFirstWorkflowNode(request: FindFirstWorkflowNodeRequest, metadata?: Metadata): Promise<FindFirstWorkflowNodeResponse> | Observable<FindFirstWorkflowNodeResponse> | FindFirstWorkflowNodeResponse;
115
184
  updateWorkflowNode(request: UpdateWorkflowNodeRequest, metadata?: Metadata): Promise<WorkflowNodeResponse> | Observable<WorkflowNodeResponse> | WorkflowNodeResponse;
116
185
  deleteWorkflowNode(request: DeleteWorkflowNodeRequest, metadata?: Metadata): void;
186
+ saveWorkflowBatch(request: SaveWorkflowBatchRequest, metadata?: Metadata): void;
187
+ findWorkflowNodeTypes(request: Empty, metadata?: Metadata): Promise<FindManyWorkflowNodeTypeResponse> | Observable<FindManyWorkflowNodeTypeResponse> | FindManyWorkflowNodeTypeResponse;
188
+ findConnections(request: FindConnectionsRequest, metadata?: Metadata): Promise<FindConnectionsResponse> | Observable<FindConnectionsResponse> | FindConnectionsResponse;
189
+ updateWorkflowStatus(request: UpdateWorkflowStatusRequest, metadata?: Metadata): void;
117
190
  }
118
191
  export declare function WorkflowServiceControllerMethods(): (constructor: Function) => void;
119
192
  export declare const WORKFLOW_SERVICE_NAME = "WorkflowService";
@@ -2,14 +2,23 @@
2
2
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
3
  // versions:
4
4
  // protoc-gen-ts_proto v1.181.2
5
- // protoc v6.33.2
5
+ // protoc v5.29.6
6
6
  // source: workflow.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.WORKFLOW_SERVICE_NAME = exports.WORKFLOW_PACKAGE_NAME = exports.protobufPackage = void 0;
8
+ exports.WORKFLOW_SERVICE_NAME = exports.WORKFLOW_PACKAGE_NAME = exports.WorkflowStatus = exports.protobufPackage = void 0;
9
9
  exports.WorkflowServiceControllerMethods = WorkflowServiceControllerMethods;
10
10
  const microservices_1 = require("@nestjs/microservices");
11
+ const protobufjs_1 = require("protobufjs");
12
+ const struct_1 = require("./google/protobuf/struct");
11
13
  exports.protobufPackage = "workflow";
14
+ var WorkflowStatus;
15
+ (function (WorkflowStatus) {
16
+ WorkflowStatus["DRAFT"] = "DRAFT";
17
+ WorkflowStatus["PUBLISHED"] = "PUBLISHED";
18
+ WorkflowStatus["UNRECOGNIZED"] = "UNRECOGNIZED";
19
+ })(WorkflowStatus || (exports.WorkflowStatus = WorkflowStatus = {}));
12
20
  exports.WORKFLOW_PACKAGE_NAME = "workflow";
21
+ protobufjs_1.wrappers[".google.protobuf.Struct"] = { fromObject: struct_1.Struct.wrap, toObject: struct_1.Struct.unwrap };
13
22
  function WorkflowServiceControllerMethods() {
14
23
  return function (constructor) {
15
24
  const grpcMethods = [
@@ -18,11 +27,16 @@ function WorkflowServiceControllerMethods() {
18
27
  "delete",
19
28
  "update",
20
29
  "triggerWorkflow",
30
+ "triggerNode",
21
31
  "createWorkflowNode",
22
32
  "findManyWorkflowNode",
23
33
  "findFirstWorkflowNode",
24
34
  "updateWorkflowNode",
25
35
  "deleteWorkflowNode",
36
+ "saveWorkflowBatch",
37
+ "findWorkflowNodeTypes",
38
+ "findConnections",
39
+ "updateWorkflowStatus",
26
40
  ];
27
41
  for (const method of grpcMethods) {
28
42
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -3,6 +3,7 @@ export interface GrpcClientModuleOptions {
3
3
  authServiceUrl: string;
4
4
  projectServiceUrl: string;
5
5
  workflowServiceUrl: string;
6
+ executorCoreServiceUrl: string;
6
7
  }
7
8
  export declare class GrpcClientModule {
8
9
  static forRoot(options: GrpcClientModuleOptions): DynamicModule;
@@ -48,6 +48,8 @@ const auth_config_1 = require("../config/auth-config");
48
48
  const project_config_1 = require("../config/project-config");
49
49
  const workflow_1 = require("../generated/workflow");
50
50
  const workflow_config_1 = require("../config/workflow-config");
51
+ const executor_core_1 = require("../generated/executor-core");
52
+ const executor_core_config_1 = require("../config/executor-core-config");
51
53
  let GrpcClientModule = (() => {
52
54
  let _classDecorators = [(0, common_1.Module)({})];
53
55
  let _classDescriptor;
@@ -108,6 +110,22 @@ let GrpcClientModule = (() => {
108
110
  },
109
111
  },
110
112
  },
113
+ {
114
+ name: executor_core_1.CORE_EXECUTION_SERVICE_NAME,
115
+ transport: microservices_1.Transport.GRPC,
116
+ options: {
117
+ package: executor_core_1.EXECUTOR_CORE_PACKAGE_NAME,
118
+ protoPath: executor_core_config_1.EXECUTOR_CORE_PROTO_PATH.map((p) => (0, path_1.join)(__dirname, "../../" + p)),
119
+ url: options.executorCoreServiceUrl,
120
+ loader: {
121
+ keepCase: true,
122
+ longs: String,
123
+ enums: String,
124
+ defaults: true,
125
+ oneofs: true,
126
+ },
127
+ },
128
+ },
111
129
  ]),
112
130
  ],
113
131
  exports: [microservices_1.ClientsModule],
@@ -0,0 +1 @@
1
+ export declare function unwrapStruct(fields: Record<string, any>): Record<string, any>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.unwrapStruct = unwrapStruct;
4
+ function unwrapStruct(fields) {
5
+ var _a, _b;
6
+ const result = {};
7
+ for (const key in fields) {
8
+ const value = fields[key];
9
+ if ("stringValue" in value)
10
+ result[key] = value.stringValue;
11
+ else if ("numberValue" in value)
12
+ result[key] = value.numberValue;
13
+ else if ("boolValue" in value)
14
+ result[key] = value.boolValue;
15
+ else if ("structValue" in value)
16
+ result[key] = unwrapStruct((_a = value.structValue.fields) !== null && _a !== void 0 ? _a : {});
17
+ else if ("listValue" in value)
18
+ result[key] = (_b = value.listValue.values) === null || _b === void 0 ? void 0 : _b.map((v) => unwrapStruct({ tmp: v }).tmp);
19
+ else
20
+ result[key] = null;
21
+ }
22
+ return result;
23
+ }
package/dist/index.d.ts CHANGED
@@ -6,4 +6,8 @@ export * from "./config/workflow-config";
6
6
  export * as Project from "./generated/project";
7
7
  export * from "./config/project-config";
8
8
  export * from "./grpc-client";
9
+ export * from "./config/executor-core-config";
9
10
  export { Metadata } from "@grpc/grpc-js";
11
+ export * as ExecutorCore from "./generated/executor-core";
12
+ export * from "./kafka/kafka-topics";
13
+ export { Struct, Value, ListValue } from "./generated/google/protobuf/struct";