@wenlarge/communication 1.1.3 → 1.1.5

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.
@@ -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 v7.34.0
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);
@@ -4,11 +4,15 @@ export declare const protobufPackage = "executor_core";
4
4
  export interface ExecuteNodeRequest {
5
5
  nodeTypeId: string;
6
6
  nodeId: string;
7
- config: string;
8
- inputSchema: string;
7
+ config?: {
8
+ [key: string]: any;
9
+ } | undefined;
10
+ inputSchema?: {
11
+ [key: string]: any;
12
+ } | undefined;
9
13
  }
10
14
  export interface ExecuteNodeResponse {
11
- lastResult: string;
15
+ output: string;
12
16
  }
13
17
  export declare const EXECUTOR_CORE_PACKAGE_NAME = "executor_core";
14
18
  export interface CoreExecutionServiceClient {
@@ -2,14 +2,17 @@
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 v7.34.0
6
6
  // source: executor-core.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.CORE_EXECUTION_SERVICE_NAME = exports.EXECUTOR_CORE_PACKAGE_NAME = exports.protobufPackage = void 0;
9
9
  exports.CoreExecutionServiceControllerMethods = CoreExecutionServiceControllerMethods;
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 = "executor_core";
12
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 };
13
16
  function CoreExecutionServiceControllerMethods() {
14
17
  return function (constructor) {
15
18
  const grpcMethods = ["executeNode"];
@@ -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 v7.34.0
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 v7.34.0
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 v7.34.0
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,20 +35,26 @@ export interface FindManyWorkflowResponse {
30
35
  data: WorkflowResponse[];
31
36
  total: number;
32
37
  }
33
- export interface TriggerExecutionRequest {
34
- nodeId: string;
38
+ export interface TriggerWorkflowRequest {
39
+ workflowId: string;
35
40
  }
36
- export interface TriggerExecutionResponse {
37
- ok: boolean;
41
+ export interface TriggerNodeRequest {
42
+ nodeId: string;
38
43
  }
39
44
  export interface CreateWorkflowNodeRequest {
40
45
  workflowId: string;
41
46
  name: string;
42
47
  positionX: number;
43
48
  positionY: number;
44
- inputSchema: string;
45
- outputSchema: string;
46
- config: string;
49
+ inputSchema?: {
50
+ [key: string]: any;
51
+ } | undefined;
52
+ outputSchema?: {
53
+ [key: string]: any;
54
+ } | undefined;
55
+ config?: {
56
+ [key: string]: any;
57
+ } | undefined;
47
58
  nodeTypeId: string;
48
59
  }
49
60
  export interface UpdateWorkflowNodeRequest {
@@ -52,9 +63,15 @@ export interface UpdateWorkflowNodeRequest {
52
63
  nodeTypeId: string;
53
64
  positionX: number;
54
65
  positionY: number;
55
- inputSchema: string;
56
- outputSchema: string;
57
- config: string;
66
+ inputSchema?: {
67
+ [key: string]: any;
68
+ } | undefined;
69
+ outputSchema?: {
70
+ [key: string]: any;
71
+ } | undefined;
72
+ config?: {
73
+ [key: string]: any;
74
+ } | undefined;
58
75
  workflowId: string;
59
76
  }
60
77
  export interface DeleteWorkflowNodeRequest {
@@ -81,9 +98,15 @@ export interface WorkflowNodeResponse {
81
98
  nodeTypeId: string;
82
99
  positionX: number;
83
100
  positionY: number;
84
- inputSchema: string;
85
- outputSchema: string;
86
- config: string;
101
+ inputSchema?: {
102
+ [key: string]: any;
103
+ } | undefined;
104
+ outputSchema?: {
105
+ [key: string]: any;
106
+ } | undefined;
107
+ config?: {
108
+ [key: string]: any;
109
+ } | undefined;
87
110
  createdAt: string;
88
111
  updatedAt: string;
89
112
  workflowId: string;
@@ -94,7 +117,7 @@ export interface WorkflowNodeConnection {
94
117
  fromNodeId: string;
95
118
  toNodeId: string;
96
119
  }
97
- export interface UpdateBatchWorkflowRequest {
120
+ export interface SaveWorkflowBatchRequest {
98
121
  workflowId: string;
99
122
  nodes: UpdateWorkflowNodeRequest[];
100
123
  connections: UpdateBatchConnection[];
@@ -103,32 +126,62 @@ export interface UpdateBatchConnection {
103
126
  fromNodeId: string;
104
127
  toNodeId: string;
105
128
  }
129
+ export interface WorkflowNodeTypeResponse {
130
+ id: string;
131
+ label: string;
132
+ description: string;
133
+ service: string;
134
+ form?: {
135
+ [key: string]: any;
136
+ } | undefined;
137
+ }
138
+ export interface FindManyWorkflowNodeTypeResponse {
139
+ data: WorkflowNodeTypeResponse[];
140
+ }
141
+ export interface FindConnectionsRequest {
142
+ workflowId: string;
143
+ }
144
+ export interface FindConnectionsResponse {
145
+ data: WorkflowNodeConnection[];
146
+ }
147
+ export interface UpdateWorkflowStatusRequest {
148
+ workflowId: string;
149
+ status: WorkflowStatus;
150
+ }
106
151
  export declare const WORKFLOW_PACKAGE_NAME = "workflow";
107
152
  export interface WorkflowServiceClient {
108
153
  create(request: CreateWorkflowRequest, metadata?: Metadata): Observable<WorkflowResponse>;
109
154
  findMany(request: FindManyWorkflowRequest, metadata?: Metadata): Observable<FindManyWorkflowResponse>;
110
155
  delete(request: DeleteWorkflowRequest, metadata?: Metadata): Observable<Empty>;
111
156
  update(request: UpdateWorkflowRequest, metadata?: Metadata): Observable<WorkflowResponse>;
112
- triggerWorkflow(request: TriggerExecutionRequest, metadata?: Metadata): Observable<TriggerExecutionResponse>;
157
+ triggerWorkflow(request: TriggerWorkflowRequest, metadata?: Metadata): Observable<Empty>;
158
+ triggerNode(request: TriggerNodeRequest, metadata?: Metadata): Observable<Empty>;
113
159
  createWorkflowNode(request: CreateWorkflowNodeRequest, metadata?: Metadata): Observable<WorkflowNodeResponse>;
114
160
  findManyWorkflowNode(request: FindManyWorkflowNodeRequest, metadata?: Metadata): Observable<FindManyWorkflowNodeResponse>;
115
161
  findFirstWorkflowNode(request: FindFirstWorkflowNodeRequest, metadata?: Metadata): Observable<FindFirstWorkflowNodeResponse>;
116
162
  updateWorkflowNode(request: UpdateWorkflowNodeRequest, metadata?: Metadata): Observable<WorkflowNodeResponse>;
117
163
  deleteWorkflowNode(request: DeleteWorkflowNodeRequest, metadata?: Metadata): Observable<Empty>;
118
- updateBatchWorkflow(request: UpdateBatchWorkflowRequest, metadata?: Metadata): Observable<Empty>;
164
+ saveWorkflowBatch(request: SaveWorkflowBatchRequest, metadata?: Metadata): Observable<Empty>;
165
+ findWorkflowNodeTypes(request: Empty, metadata?: Metadata): Observable<FindManyWorkflowNodeTypeResponse>;
166
+ findConnections(request: FindConnectionsRequest, metadata?: Metadata): Observable<FindConnectionsResponse>;
167
+ updateWorkflowStatus(request: UpdateWorkflowStatusRequest, metadata?: Metadata): Observable<Empty>;
119
168
  }
120
169
  export interface WorkflowServiceController {
121
170
  create(request: CreateWorkflowRequest, metadata?: Metadata): Promise<WorkflowResponse> | Observable<WorkflowResponse> | WorkflowResponse;
122
171
  findMany(request: FindManyWorkflowRequest, metadata?: Metadata): Promise<FindManyWorkflowResponse> | Observable<FindManyWorkflowResponse> | FindManyWorkflowResponse;
123
172
  delete(request: DeleteWorkflowRequest, metadata?: Metadata): void;
124
173
  update(request: UpdateWorkflowRequest, metadata?: Metadata): Promise<WorkflowResponse> | Observable<WorkflowResponse> | WorkflowResponse;
125
- triggerWorkflow(request: TriggerExecutionRequest, metadata?: Metadata): Promise<TriggerExecutionResponse> | Observable<TriggerExecutionResponse> | TriggerExecutionResponse;
174
+ triggerWorkflow(request: TriggerWorkflowRequest, metadata?: Metadata): void;
175
+ triggerNode(request: TriggerNodeRequest, metadata?: Metadata): void;
126
176
  createWorkflowNode(request: CreateWorkflowNodeRequest, metadata?: Metadata): Promise<WorkflowNodeResponse> | Observable<WorkflowNodeResponse> | WorkflowNodeResponse;
127
177
  findManyWorkflowNode(request: FindManyWorkflowNodeRequest, metadata?: Metadata): Promise<FindManyWorkflowNodeResponse> | Observable<FindManyWorkflowNodeResponse> | FindManyWorkflowNodeResponse;
128
178
  findFirstWorkflowNode(request: FindFirstWorkflowNodeRequest, metadata?: Metadata): Promise<FindFirstWorkflowNodeResponse> | Observable<FindFirstWorkflowNodeResponse> | FindFirstWorkflowNodeResponse;
129
179
  updateWorkflowNode(request: UpdateWorkflowNodeRequest, metadata?: Metadata): Promise<WorkflowNodeResponse> | Observable<WorkflowNodeResponse> | WorkflowNodeResponse;
130
180
  deleteWorkflowNode(request: DeleteWorkflowNodeRequest, metadata?: Metadata): void;
131
- updateBatchWorkflow(request: UpdateBatchWorkflowRequest, metadata?: Metadata): void;
181
+ saveWorkflowBatch(request: SaveWorkflowBatchRequest, metadata?: Metadata): void;
182
+ findWorkflowNodeTypes(request: Empty, metadata?: Metadata): Promise<FindManyWorkflowNodeTypeResponse> | Observable<FindManyWorkflowNodeTypeResponse> | FindManyWorkflowNodeTypeResponse;
183
+ findConnections(request: FindConnectionsRequest, metadata?: Metadata): Promise<FindConnectionsResponse> | Observable<FindConnectionsResponse> | FindConnectionsResponse;
184
+ updateWorkflowStatus(request: UpdateWorkflowStatusRequest, metadata?: Metadata): void;
132
185
  }
133
186
  export declare function WorkflowServiceControllerMethods(): (constructor: Function) => void;
134
187
  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 v7.34.0
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,12 +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",
26
- "updateBatchWorkflow",
36
+ "saveWorkflowBatch",
37
+ "findWorkflowNodeTypes",
38
+ "findConnections",
39
+ "updateWorkflowStatus",
27
40
  ];
28
41
  for (const method of grpcMethods) {
29
42
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -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
@@ -10,3 +10,4 @@ export * from "./config/executor-core-config";
10
10
  export { Metadata } from "@grpc/grpc-js";
11
11
  export * as ExecutorCore from "./generated/executor-core";
12
12
  export * from "./kafka/kafka-topics";
13
+ export { Struct, Value, ListValue } from "./generated/google/protobuf/struct";
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.ExecutorCore = exports.Metadata = exports.Project = exports.Workflow = exports.Auth = void 0;
39
+ exports.ListValue = exports.Value = exports.Struct = exports.ExecutorCore = exports.Metadata = exports.Project = exports.Workflow = exports.Auth = void 0;
40
40
  __exportStar(require("./helpers/helper"), exports);
41
41
  exports.Auth = __importStar(require("./generated/auth"));
42
42
  __exportStar(require("./config/auth-config"), exports);
@@ -50,3 +50,7 @@ var grpc_js_1 = require("@grpc/grpc-js");
50
50
  Object.defineProperty(exports, "Metadata", { enumerable: true, get: function () { return grpc_js_1.Metadata; } });
51
51
  exports.ExecutorCore = __importStar(require("./generated/executor-core"));
52
52
  __exportStar(require("./kafka/kafka-topics"), exports);
53
+ var struct_1 = require("./generated/google/protobuf/struct");
54
+ Object.defineProperty(exports, "Struct", { enumerable: true, get: function () { return struct_1.Struct; } });
55
+ Object.defineProperty(exports, "Value", { enumerable: true, get: function () { return struct_1.Value; } });
56
+ Object.defineProperty(exports, "ListValue", { enumerable: true, get: function () { return struct_1.ListValue; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenlarge/communication",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
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",
package/proto/auth.proto CHANGED
@@ -10,6 +10,8 @@ service AuthService {
10
10
  rpc GetMe (GetMeRequest) returns (GetMeResponse);
11
11
  rpc InviteToCompany (InviteToCompanyRequest) returns (InviteToCompanyResponse);
12
12
  rpc UpdateInviteStatus (UpdateInviteStatusRequest) returns (UpdateInviteStatusResponse);
13
+ rpc GetCompanyUsers (GetCompanyUsersRequest) returns (GetCompanyUsersResponse);
14
+ rpc RemoveUserFromCompany (RemoveUserFromCompanyRequest) returns (google.protobuf.Empty);
13
15
  }
14
16
 
15
17
  message LoginRequest {
@@ -72,4 +74,25 @@ message GetMeResponse {
72
74
  string createdAt = 4;
73
75
  string updatedAt = 5;
74
76
  repeated CompanyUser companyUsersOnUser = 6;
77
+ }
78
+
79
+ message GetCompanyUsersRequest {
80
+ string companyId = 1;
81
+ }
82
+
83
+ message CompanyUserDetail {
84
+ string userId = 1;
85
+ string userName = 2;
86
+ string userEmail = 3;
87
+ string joinedAt = 4;
88
+ bool isOwner = 5;
89
+ }
90
+
91
+ message GetCompanyUsersResponse {
92
+ repeated CompanyUserDetail users = 1;
93
+ }
94
+
95
+ message RemoveUserFromCompanyRequest {
96
+ string companyId = 1;
97
+ string userId = 2;
75
98
  }
@@ -1,16 +1,17 @@
1
1
  syntax = "proto3";
2
2
 
3
3
  package executor_core;
4
+ import "google/protobuf/struct.proto";
4
5
 
5
6
  message ExecuteNodeRequest {
6
7
  string nodeTypeId = 1;
7
8
  string nodeId = 2;
8
- string config = 3;
9
- string inputSchema = 4;
9
+ google.protobuf.Struct config = 3;
10
+ google.protobuf.Struct inputSchema = 4;
10
11
  }
11
12
 
12
13
  message ExecuteNodeResponse {
13
- string lastResult = 1;
14
+ string output = 1;
14
15
  }
15
16
 
16
17
  service CoreExecutionService {