@wenlarge/communication 1.0.7 → 1.0.9

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 WORKFLOW_NODE_PROTO_PATH: string[];
@@ -0,0 +1,6 @@
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
+ ];
@@ -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 v3.21.5
5
+ // protoc v6.33.1
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;
@@ -0,0 +1,6 @@
1
+ export declare const protobufPackage = "common";
2
+ export interface PaginateRequest {
3
+ skip: number;
4
+ take: number;
5
+ }
6
+ export declare const COMMON_PACKAGE_NAME = "common";
@@ -0,0 +1,11 @@
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 v6.33.1
6
+ // source: common.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.COMMON_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ exports.protobufPackage = "common";
11
+ exports.COMMON_PACKAGE_NAME = "common";
@@ -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 v3.21.5
5
+ // protoc v6.33.1
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;
@@ -20,10 +20,12 @@ export interface UpdateProjectRequest {
20
20
  name: string;
21
21
  }
22
22
  export interface GetAllRequest {
23
- companyId: string;
23
+ skip: number;
24
+ take: number;
24
25
  }
25
26
  export interface GetAllResponse {
26
- projects: ProjectResponse[];
27
+ data: ProjectResponse[];
28
+ total: number;
27
29
  }
28
30
  export interface GetProjectByIdRequest {
29
31
  id: string;
@@ -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 v3.21.5
5
+ // protoc v6.33.1
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;
@@ -10,6 +10,7 @@ export interface WorkflowResponse {
10
10
  id: string;
11
11
  name: string;
12
12
  companyId: string;
13
+ projectId: string;
13
14
  createdAt: string;
14
15
  updatedAt: string;
15
16
  }
@@ -21,10 +22,67 @@ export interface UpdateWorkflowRequest {
21
22
  name: string;
22
23
  }
23
24
  export interface GetAllWorkflowRequest {
24
- companyId: string;
25
+ projectId: string;
26
+ skip: number;
27
+ take: number;
25
28
  }
26
29
  export interface GetAllWorkflowResponse {
27
- workflows: WorkflowResponse[];
30
+ data: WorkflowResponse[];
31
+ total: number;
32
+ }
33
+ /** NODE SERVICE COMPS */
34
+ export interface NodeCreateRequest {
35
+ workflowId: string;
36
+ name: string;
37
+ type: string;
38
+ positionX: number;
39
+ positionY: number;
40
+ inputSchema: string;
41
+ outputSchema: string;
42
+ config: string;
43
+ nextNodeIds: string[];
44
+ }
45
+ export interface NodeUpdateRequest {
46
+ id: string;
47
+ name: string;
48
+ type: string;
49
+ positionX: number;
50
+ positionY: number;
51
+ nextNodeIds: string[];
52
+ inputSchema: string;
53
+ outputSchema: string;
54
+ config: string;
55
+ }
56
+ export interface NodeDeleteRequest {
57
+ id: string;
58
+ }
59
+ export interface NodeGetAllRequest {
60
+ workflowId: string;
61
+ skip: number;
62
+ take: number;
63
+ }
64
+ export interface NodeGetAllResponse {
65
+ data: NodeResponse[];
66
+ total: number;
67
+ }
68
+ export interface NodeGetByIdRequest {
69
+ id: string;
70
+ }
71
+ export interface NodeGetByIdResponse {
72
+ node?: NodeResponse | undefined;
73
+ }
74
+ export interface NodeResponse {
75
+ id: string;
76
+ name: string;
77
+ type: string;
78
+ positionX: number;
79
+ positionY: number;
80
+ inputSchema: string;
81
+ outputSchema: string;
82
+ config: string;
83
+ nextNodeIds: string[];
84
+ createdAt: string;
85
+ updatedAt: string;
28
86
  }
29
87
  export declare const WORKFLOW_PACKAGE_NAME = "workflow";
30
88
  export interface WorkflowServiceClient {
@@ -32,12 +90,22 @@ export interface WorkflowServiceClient {
32
90
  getAll(request: GetAllWorkflowRequest, metadata?: Metadata): Observable<GetAllWorkflowResponse>;
33
91
  delete(request: DeleteWorkflowRequest, metadata?: Metadata): Observable<Empty>;
34
92
  update(request: UpdateWorkflowRequest, metadata?: Metadata): Observable<WorkflowResponse>;
93
+ createNode(request: NodeCreateRequest, metadata?: Metadata): Observable<NodeResponse>;
94
+ getAllNode(request: NodeGetAllRequest, metadata?: Metadata): Observable<NodeGetAllResponse>;
95
+ getByIdNode(request: NodeGetByIdRequest, metadata?: Metadata): Observable<NodeGetByIdResponse>;
96
+ updateNode(request: NodeUpdateRequest, metadata?: Metadata): Observable<NodeResponse>;
97
+ deleteNode(request: NodeDeleteRequest, metadata?: Metadata): Observable<Empty>;
35
98
  }
36
99
  export interface WorkflowServiceController {
37
100
  create(request: CreateWorkflowRequest, metadata?: Metadata): Promise<WorkflowResponse> | Observable<WorkflowResponse> | WorkflowResponse;
38
101
  getAll(request: GetAllWorkflowRequest, metadata?: Metadata): Promise<GetAllWorkflowResponse> | Observable<GetAllWorkflowResponse> | GetAllWorkflowResponse;
39
102
  delete(request: DeleteWorkflowRequest, metadata?: Metadata): void;
40
103
  update(request: UpdateWorkflowRequest, metadata?: Metadata): Promise<WorkflowResponse> | Observable<WorkflowResponse> | WorkflowResponse;
104
+ createNode(request: NodeCreateRequest, metadata?: Metadata): Promise<NodeResponse> | Observable<NodeResponse> | NodeResponse;
105
+ getAllNode(request: NodeGetAllRequest, metadata?: Metadata): Promise<NodeGetAllResponse> | Observable<NodeGetAllResponse> | NodeGetAllResponse;
106
+ getByIdNode(request: NodeGetByIdRequest, metadata?: Metadata): Promise<NodeGetByIdResponse> | Observable<NodeGetByIdResponse> | NodeGetByIdResponse;
107
+ updateNode(request: NodeUpdateRequest, metadata?: Metadata): Promise<NodeResponse> | Observable<NodeResponse> | NodeResponse;
108
+ deleteNode(request: NodeDeleteRequest, metadata?: Metadata): void;
41
109
  }
42
110
  export declare function WorkflowServiceControllerMethods(): (constructor: Function) => void;
43
111
  export declare const WORKFLOW_SERVICE_NAME = "WorkflowService";
@@ -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 v3.21.5
5
+ // protoc v6.33.1
6
6
  // source: workflow.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.WORKFLOW_SERVICE_NAME = exports.WORKFLOW_PACKAGE_NAME = exports.protobufPackage = void 0;
@@ -12,7 +12,17 @@ exports.protobufPackage = "workflow";
12
12
  exports.WORKFLOW_PACKAGE_NAME = "workflow";
13
13
  function WorkflowServiceControllerMethods() {
14
14
  return function (constructor) {
15
- const grpcMethods = ["create", "getAll", "delete", "update"];
15
+ const grpcMethods = [
16
+ "create",
17
+ "getAll",
18
+ "delete",
19
+ "update",
20
+ "createNode",
21
+ "getAllNode",
22
+ "getByIdNode",
23
+ "updateNode",
24
+ "deleteNode",
25
+ ];
16
26
  for (const method of grpcMethods) {
17
27
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
18
28
  (0, microservices_1.GrpcMethod)("WorkflowService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,49 +1,49 @@
1
- {
2
- "name": "@wenlarge/communication",
3
- "version": "1.0.7",
4
- "description": "Shared gRPC proto interfaces and generated clients for Wenlarge microservices.",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "files": [
8
- "dist",
9
- "proto",
10
- "src/generated"
11
- ],
12
- "scripts": {
13
- "proto:build": "protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --proto_path=proto --ts_proto_out=src/generated proto/*.proto --ts_proto_opt=nestJs=true,esModuleInterop=true,forceLong=string,useOptionals=messages,useDate=true,addGrpcMetadata=true,stringEnums=true",
14
- "build": "npm run proto:build && tsc",
15
- "prepare": "npm run build"
16
- },
17
- "keywords": [
18
- "nestjs",
19
- "grpc",
20
- "proto",
21
- "typescript",
22
- "microservices",
23
- "communication",
24
- "shared"
25
- ],
26
- "author": "Kerem Çakır <admin@wenlarge.com>",
27
- "license": "MIT",
28
- "repository": {
29
- "type": "git",
30
- "url": "https://github.com/wenlarge/communication.git"
31
- },
32
- "publishConfig": {
33
- "access": "public"
34
- },
35
- "dependencies": {
36
- "@grpc/grpc-js": "^1.14.1",
37
- "@grpc/proto-loader": "^0.7.15",
38
- "rxjs": "^7.8.1"
39
- },
40
- "devDependencies": {
41
- "@nestjs/microservices": "^10.4.20",
42
- "@types/node": "^24.9.1",
43
- "ts-proto": "^1.152.2",
44
- "typescript": "^5.3.3"
45
- },
46
- "peerDependencies":{
47
- "@grpc/grpc-js": "^1.14.1"
48
- }
49
- }
1
+ {
2
+ "name": "@wenlarge/communication",
3
+ "version": "1.0.9",
4
+ "description": "Shared gRPC proto interfaces and generated clients for Wenlarge microservices.",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist",
9
+ "proto",
10
+ "src/generated"
11
+ ],
12
+ "scripts": {
13
+ "proto:build": "npx protoc --plugin=protoc-gen-ts_proto=%CD%\\node_modules\\.bin\\protoc-gen-ts_proto.cmd --proto_path=proto --ts_proto_out=src/generated proto/*.proto --ts_proto_opt=nestJs=true,esModuleInterop=true,forceLong=string,useOptionals=messages,useDate=true,addGrpcMetadata=true,stringEnums=true",
14
+ "build": "npm run proto:build && tsc",
15
+ "prepare": "npm run build"
16
+ },
17
+ "keywords": [
18
+ "nestjs",
19
+ "grpc",
20
+ "proto",
21
+ "typescript",
22
+ "microservices",
23
+ "communication",
24
+ "shared"
25
+ ],
26
+ "author": "Kerem Çakır <admin@wenlarge.com>",
27
+ "license": "MIT",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "https://github.com/wenlarge/communication.git"
31
+ },
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "dependencies": {
36
+ "@grpc/grpc-js": "^1.14.1",
37
+ "@grpc/proto-loader": "^0.7.15",
38
+ "rxjs": "^7.8.1"
39
+ },
40
+ "devDependencies": {
41
+ "@nestjs/microservices": "^10.4.20",
42
+ "@types/node": "^24.9.1",
43
+ "ts-proto": "^1.152.2",
44
+ "typescript": "^5.3.3"
45
+ },
46
+ "peerDependencies": {
47
+ "@grpc/grpc-js": "^1.14.1"
48
+ }
49
+ }
package/proto/auth.proto CHANGED
@@ -1,75 +1,75 @@
1
- syntax = "proto3";
2
-
3
- import "google/protobuf/empty.proto";
4
-
5
- package auth;
6
-
7
- service AuthService {
8
- rpc Login (LoginRequest) returns (LoginResponse);
9
- rpc Register (RegisterRequest) returns (google.protobuf.Empty);
10
- rpc GetMe (GetMeRequest) returns (GetMeResponse);
11
- rpc InviteToCompany (InviteToCompanyRequest) returns (InviteToCompanyResponse);
12
- rpc UpdateInviteStatus (UpdateInviteStatusRequest) returns (UpdateInviteStatusResponse);
13
- }
14
-
15
- message LoginRequest {
16
- string email = 1;
17
- string password = 2;
18
- }
19
-
20
- message LoginResponse {
21
- string jwt = 1;
22
- string expiresIn = 2;
23
- }
24
-
25
- message RegisterRequest {
26
- string name = 1;
27
- string email = 2;
28
- string password = 3;
29
- }
30
-
31
- message GetMeRequest {
32
- string jwt = 1;
33
- }
34
-
35
- message Company {
36
- string id = 1;
37
- string name = 2;
38
- string createdAt = 3;
39
- string updatedAt = 4;
40
- }
41
-
42
- message CompanyUser {
43
- Company company = 1;
44
- }
45
-
46
- message InviteToCompanyRequest {
47
- string companyId = 1;
48
- string email = 2;
49
- }
50
-
51
- message InviteToCompanyResponse{
52
- string id = 1;
53
- string companyId = 2;
54
- string email = 3;
55
- }
56
-
57
- message UpdateInviteStatusRequest{
58
- string inviteId = 1;
59
- string userId =2;
60
- string status = 3;
61
- }
62
-
63
- message UpdateInviteStatusResponse{
64
- string id = 1 ;
65
- string status = 2;
66
- }
67
-
68
- message GetMeResponse {
69
- string id = 1;
70
- string name = 2;
71
- string email = 3;
72
- string createdAt = 4;
73
- string updatedAt = 5;
74
- repeated CompanyUser companyUsersOnUser = 6;
1
+ syntax = "proto3";
2
+
3
+ import "google/protobuf/empty.proto";
4
+
5
+ package auth;
6
+
7
+ service AuthService {
8
+ rpc Login (LoginRequest) returns (LoginResponse);
9
+ rpc Register (RegisterRequest) returns (google.protobuf.Empty);
10
+ rpc GetMe (GetMeRequest) returns (GetMeResponse);
11
+ rpc InviteToCompany (InviteToCompanyRequest) returns (InviteToCompanyResponse);
12
+ rpc UpdateInviteStatus (UpdateInviteStatusRequest) returns (UpdateInviteStatusResponse);
13
+ }
14
+
15
+ message LoginRequest {
16
+ string email = 1;
17
+ string password = 2;
18
+ }
19
+
20
+ message LoginResponse {
21
+ string jwt = 1;
22
+ string expiresIn = 2;
23
+ }
24
+
25
+ message RegisterRequest {
26
+ string name = 1;
27
+ string email = 2;
28
+ string password = 3;
29
+ }
30
+
31
+ message GetMeRequest {
32
+ string jwt = 1;
33
+ }
34
+
35
+ message Company {
36
+ string id = 1;
37
+ string name = 2;
38
+ string createdAt = 3;
39
+ string updatedAt = 4;
40
+ }
41
+
42
+ message CompanyUser {
43
+ Company company = 1;
44
+ }
45
+
46
+ message InviteToCompanyRequest {
47
+ string companyId = 1;
48
+ string email = 2;
49
+ }
50
+
51
+ message InviteToCompanyResponse{
52
+ string id = 1;
53
+ string companyId = 2;
54
+ string email = 3;
55
+ }
56
+
57
+ message UpdateInviteStatusRequest{
58
+ string inviteId = 1;
59
+ string userId =2;
60
+ string status = 3;
61
+ }
62
+
63
+ message UpdateInviteStatusResponse{
64
+ string id = 1 ;
65
+ string status = 2;
66
+ }
67
+
68
+ message GetMeResponse {
69
+ string id = 1;
70
+ string name = 2;
71
+ string email = 3;
72
+ string createdAt = 4;
73
+ string updatedAt = 5;
74
+ repeated CompanyUser companyUsersOnUser = 6;
75
75
  }
@@ -1,51 +1,52 @@
1
- syntax = "proto3";
2
-
3
- import "google/protobuf/empty.proto";
4
-
5
-
6
- package project;
7
-
8
- service ProjectService {
9
- rpc Create (CreateProjectRequest) returns (ProjectResponse);
10
- rpc GetAll (GetAllRequest) returns (GetAllResponse);
11
- rpc Delete (DeleteProjectRequest) returns (google.protobuf.Empty);
12
- rpc Update (UpdateProjectRequest) returns (ProjectResponse);
13
- rpc GetById (GetProjectByIdRequest) returns (GetProjectByIdResponse);
14
- }
15
-
16
- message CreateProjectRequest {
17
- string name = 1;
18
- }
19
-
20
- message ProjectResponse {
21
- string id = 1;
22
- string name = 2;
23
- string companyId = 3;
24
- string createdAt = 4;
25
- string updatedAt = 5;
26
- }
27
-
28
- message DeleteProjectRequest{
29
- string id = 1;
30
- }
31
-
32
- message UpdateProjectRequest{
33
- string id = 1;
34
- string name = 2;
35
- }
36
-
37
- message GetAllRequest{
38
- string companyId = 1;
39
- }
40
-
41
- message GetAllResponse{
42
- repeated ProjectResponse projects = 1;
43
- }
44
-
45
- message GetProjectByIdRequest{
46
- string id = 1;
47
- }
48
-
49
- message GetProjectByIdResponse{
50
- ProjectResponse project = 1;
1
+ syntax = "proto3";
2
+
3
+ import "google/protobuf/empty.proto";
4
+
5
+ package project;
6
+
7
+ service ProjectService {
8
+ rpc Create (CreateProjectRequest) returns (ProjectResponse);
9
+ rpc GetAll (GetAllRequest) returns (GetAllResponse);
10
+ rpc Delete (DeleteProjectRequest) returns (google.protobuf.Empty);
11
+ rpc Update (UpdateProjectRequest) returns (ProjectResponse);
12
+ rpc GetById (GetProjectByIdRequest) returns (GetProjectByIdResponse);
13
+ }
14
+
15
+ message CreateProjectRequest {
16
+ string name = 1;
17
+ }
18
+
19
+ message ProjectResponse {
20
+ string id = 1;
21
+ string name = 2;
22
+ string companyId = 3;
23
+ string createdAt = 4;
24
+ string updatedAt = 5;
25
+ }
26
+
27
+ message DeleteProjectRequest{
28
+ string id = 1;
29
+ }
30
+
31
+ message UpdateProjectRequest{
32
+ string id = 1;
33
+ string name = 2;
34
+ }
35
+
36
+ message GetAllRequest{
37
+ int32 skip = 1;
38
+ int32 take = 2;
39
+ }
40
+
41
+ message GetAllResponse{
42
+ repeated ProjectResponse data = 1;
43
+ int32 total = 2;
44
+ }
45
+
46
+ message GetProjectByIdRequest{
47
+ string id = 1;
48
+ }
49
+
50
+ message GetProjectByIdResponse{
51
+ ProjectResponse project = 1;
51
52
  }
@@ -1,42 +1,112 @@
1
- syntax = "proto3";
2
-
3
- import "google/protobuf/empty.proto";
4
-
5
- package workflow;
6
-
7
- service WorkflowService {
8
- rpc Create (CreateWorkflowRequest) returns (WorkflowResponse);
9
- rpc GetAll (GetAllWorkflowRequest) returns (GetAllWorkflowResponse);
10
- rpc Delete (DeleteWorkflowRequest) returns (google.protobuf.Empty);
11
- rpc Update (UpdateWorkflowRequest) returns (WorkflowResponse);
12
- }
13
-
14
- message CreateWorkflowRequest {
15
- string name = 1;
16
- string projectId = 2;
17
- }
18
-
19
- message WorkflowResponse {
20
- string id = 1;
21
- string name = 2;
22
- string companyId = 3;
23
- string createdAt = 4;
24
- string updatedAt = 5;
25
- }
26
-
27
- message DeleteWorkflowRequest{
28
- string id = 1;
29
- }
30
-
31
- message UpdateWorkflowRequest{
32
- string id = 1;
33
- string name = 2;
34
- }
35
-
36
- message GetAllWorkflowRequest{
37
- string companyId = 1;
38
- }
39
-
40
- message GetAllWorkflowResponse{
41
- repeated WorkflowResponse workflows = 1;
42
- }
1
+ syntax = "proto3";
2
+
3
+ import "google/protobuf/empty.proto";
4
+
5
+ package workflow;
6
+
7
+ service WorkflowService {
8
+ rpc Create (CreateWorkflowRequest) returns (WorkflowResponse);
9
+ rpc GetAll (GetAllWorkflowRequest) returns (GetAllWorkflowResponse);
10
+ rpc Delete (DeleteWorkflowRequest) returns (google.protobuf.Empty);
11
+ rpc Update (UpdateWorkflowRequest) returns (WorkflowResponse);
12
+ rpc CreateNode (NodeCreateRequest) returns (NodeResponse);
13
+ rpc GetAllNode (NodeGetAllRequest) returns (NodeGetAllResponse);
14
+ rpc GetByIdNode (NodeGetByIdRequest) returns (NodeGetByIdResponse);
15
+ rpc UpdateNode (NodeUpdateRequest) returns (NodeResponse);
16
+ rpc DeleteNode (NodeDeleteRequest) returns (google.protobuf.Empty);
17
+ }
18
+
19
+ message CreateWorkflowRequest {
20
+ string name = 1;
21
+ string projectId = 2;
22
+ }
23
+
24
+ message WorkflowResponse {
25
+ string id = 1;
26
+ string name = 2;
27
+ string companyId = 3;
28
+ string projectId = 4;
29
+ string createdAt = 5;
30
+ string updatedAt = 6;
31
+ }
32
+
33
+ message DeleteWorkflowRequest{
34
+ string id = 1;
35
+ }
36
+
37
+ message UpdateWorkflowRequest{
38
+ string id = 1;
39
+ string name = 2;
40
+ }
41
+
42
+ message GetAllWorkflowRequest{
43
+ string projectId = 1;
44
+ int32 skip = 2;
45
+ int32 take = 3;
46
+ }
47
+
48
+ message GetAllWorkflowResponse{
49
+ repeated WorkflowResponse data = 1;
50
+ int32 total = 2;
51
+ }
52
+
53
+ // NODE SERVICE COMPS
54
+ message NodeCreateRequest{
55
+ string workflowId = 1;
56
+ string name = 2;
57
+ string type = 3;
58
+ int32 positionX = 4;
59
+ int32 positionY = 5;
60
+ string inputSchema = 6;
61
+ string outputSchema = 7;
62
+ string config = 8;
63
+ repeated string nextNodeIds = 9;
64
+ }
65
+
66
+ message NodeUpdateRequest{
67
+ string id = 1;
68
+ string name = 2;
69
+ string type =3;
70
+ int32 positionX = 4;
71
+ int32 positionY=5;
72
+ repeated string nextNodeIds = 6;
73
+ string inputSchema = 7;
74
+ string outputSchema = 8;
75
+ string config = 9;
76
+ }
77
+
78
+ message NodeDeleteRequest{
79
+ string id = 1;
80
+ }
81
+
82
+ message NodeGetAllRequest{
83
+ string workflowId = 1;
84
+ int32 skip = 2;
85
+ int32 take = 3;
86
+ }
87
+
88
+ message NodeGetAllResponse{
89
+ repeated NodeResponse data = 1;
90
+ int32 total = 2;
91
+ }
92
+
93
+ message NodeGetByIdRequest{
94
+ string id = 1;
95
+ }
96
+ message NodeGetByIdResponse{
97
+ NodeResponse node = 1;
98
+ }
99
+
100
+ message NodeResponse{
101
+ string id = 1;
102
+ string name = 2;
103
+ string type = 3;
104
+ int32 positionX = 4;
105
+ int32 positionY = 5;
106
+ string inputSchema = 6;
107
+ string outputSchema = 7;
108
+ string config = 8;
109
+ repeated string nextNodeIds = 9;
110
+ string createdAt = 10;
111
+ string updatedAt = 11;
112
+ }
@@ -1,7 +1,7 @@
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 v3.21.5
4
+ // protoc v6.33.1
5
5
  // source: auth.proto
6
6
 
7
7
  /* eslint-disable */
@@ -0,0 +1,16 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v1.181.2
4
+ // protoc v6.33.1
5
+ // source: common.proto
6
+
7
+ /* eslint-disable */
8
+
9
+ export const protobufPackage = "common";
10
+
11
+ export interface PaginateRequest {
12
+ skip: number;
13
+ take: number;
14
+ }
15
+
16
+ export const COMMON_PACKAGE_NAME = "common";
@@ -1,7 +1,7 @@
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 v3.21.5
4
+ // protoc v6.33.1
5
5
  // source: google/protobuf/empty.proto
6
6
 
7
7
  /* eslint-disable */
@@ -1,7 +1,7 @@
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 v3.21.5
4
+ // protoc v6.33.1
5
5
  // source: project.proto
6
6
 
7
7
  /* eslint-disable */
@@ -34,11 +34,13 @@ export interface UpdateProjectRequest {
34
34
  }
35
35
 
36
36
  export interface GetAllRequest {
37
- companyId: string;
37
+ skip: number;
38
+ take: number;
38
39
  }
39
40
 
40
41
  export interface GetAllResponse {
41
- projects: ProjectResponse[];
42
+ data: ProjectResponse[];
43
+ total: number;
42
44
  }
43
45
 
44
46
  export interface GetProjectByIdRequest {
@@ -1,7 +1,7 @@
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 v3.21.5
4
+ // protoc v6.33.1
5
5
  // source: workflow.proto
6
6
 
7
7
  /* eslint-disable */
@@ -21,6 +21,7 @@ export interface WorkflowResponse {
21
21
  id: string;
22
22
  name: string;
23
23
  companyId: string;
24
+ projectId: string;
24
25
  createdAt: string;
25
26
  updatedAt: string;
26
27
  }
@@ -35,11 +36,76 @@ export interface UpdateWorkflowRequest {
35
36
  }
36
37
 
37
38
  export interface GetAllWorkflowRequest {
38
- companyId: string;
39
+ projectId: string;
40
+ skip: number;
41
+ take: number;
39
42
  }
40
43
 
41
44
  export interface GetAllWorkflowResponse {
42
- workflows: WorkflowResponse[];
45
+ data: WorkflowResponse[];
46
+ total: number;
47
+ }
48
+
49
+ /** NODE SERVICE COMPS */
50
+ export interface NodeCreateRequest {
51
+ workflowId: string;
52
+ name: string;
53
+ type: string;
54
+ positionX: number;
55
+ positionY: number;
56
+ inputSchema: string;
57
+ outputSchema: string;
58
+ config: string;
59
+ nextNodeIds: string[];
60
+ }
61
+
62
+ export interface NodeUpdateRequest {
63
+ id: string;
64
+ name: string;
65
+ type: string;
66
+ positionX: number;
67
+ positionY: number;
68
+ nextNodeIds: string[];
69
+ inputSchema: string;
70
+ outputSchema: string;
71
+ config: string;
72
+ }
73
+
74
+ export interface NodeDeleteRequest {
75
+ id: string;
76
+ }
77
+
78
+ export interface NodeGetAllRequest {
79
+ workflowId: string;
80
+ skip: number;
81
+ take: number;
82
+ }
83
+
84
+ export interface NodeGetAllResponse {
85
+ data: NodeResponse[];
86
+ total: number;
87
+ }
88
+
89
+ export interface NodeGetByIdRequest {
90
+ id: string;
91
+ }
92
+
93
+ export interface NodeGetByIdResponse {
94
+ node?: NodeResponse | undefined;
95
+ }
96
+
97
+ export interface NodeResponse {
98
+ id: string;
99
+ name: string;
100
+ type: string;
101
+ positionX: number;
102
+ positionY: number;
103
+ inputSchema: string;
104
+ outputSchema: string;
105
+ config: string;
106
+ nextNodeIds: string[];
107
+ createdAt: string;
108
+ updatedAt: string;
43
109
  }
44
110
 
45
111
  export const WORKFLOW_PACKAGE_NAME = "workflow";
@@ -52,6 +118,16 @@ export interface WorkflowServiceClient {
52
118
  delete(request: DeleteWorkflowRequest, metadata?: Metadata): Observable<Empty>;
53
119
 
54
120
  update(request: UpdateWorkflowRequest, metadata?: Metadata): Observable<WorkflowResponse>;
121
+
122
+ createNode(request: NodeCreateRequest, metadata?: Metadata): Observable<NodeResponse>;
123
+
124
+ getAllNode(request: NodeGetAllRequest, metadata?: Metadata): Observable<NodeGetAllResponse>;
125
+
126
+ getByIdNode(request: NodeGetByIdRequest, metadata?: Metadata): Observable<NodeGetByIdResponse>;
127
+
128
+ updateNode(request: NodeUpdateRequest, metadata?: Metadata): Observable<NodeResponse>;
129
+
130
+ deleteNode(request: NodeDeleteRequest, metadata?: Metadata): Observable<Empty>;
55
131
  }
56
132
 
57
133
  export interface WorkflowServiceController {
@@ -71,11 +147,43 @@ export interface WorkflowServiceController {
71
147
  request: UpdateWorkflowRequest,
72
148
  metadata?: Metadata,
73
149
  ): Promise<WorkflowResponse> | Observable<WorkflowResponse> | WorkflowResponse;
150
+
151
+ createNode(
152
+ request: NodeCreateRequest,
153
+ metadata?: Metadata,
154
+ ): Promise<NodeResponse> | Observable<NodeResponse> | NodeResponse;
155
+
156
+ getAllNode(
157
+ request: NodeGetAllRequest,
158
+ metadata?: Metadata,
159
+ ): Promise<NodeGetAllResponse> | Observable<NodeGetAllResponse> | NodeGetAllResponse;
160
+
161
+ getByIdNode(
162
+ request: NodeGetByIdRequest,
163
+ metadata?: Metadata,
164
+ ): Promise<NodeGetByIdResponse> | Observable<NodeGetByIdResponse> | NodeGetByIdResponse;
165
+
166
+ updateNode(
167
+ request: NodeUpdateRequest,
168
+ metadata?: Metadata,
169
+ ): Promise<NodeResponse> | Observable<NodeResponse> | NodeResponse;
170
+
171
+ deleteNode(request: NodeDeleteRequest, metadata?: Metadata): void;
74
172
  }
75
173
 
76
174
  export function WorkflowServiceControllerMethods() {
77
175
  return function (constructor: Function) {
78
- const grpcMethods: string[] = ["create", "getAll", "delete", "update"];
176
+ const grpcMethods: string[] = [
177
+ "create",
178
+ "getAll",
179
+ "delete",
180
+ "update",
181
+ "createNode",
182
+ "getAllNode",
183
+ "getByIdNode",
184
+ "updateNode",
185
+ "deleteNode",
186
+ ];
79
187
  for (const method of grpcMethods) {
80
188
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
81
189
  GrpcMethod("WorkflowService", method)(constructor.prototype[method], method, descriptor);
@@ -1,108 +0,0 @@
1
- export declare const protobufPackage = "google.protobuf";
2
- /**
3
- * A Timestamp represents a point in time independent of any time zone or local
4
- * calendar, encoded as a count of seconds and fractions of seconds at
5
- * nanosecond resolution. The count is relative to an epoch at UTC midnight on
6
- * January 1, 1970, in the proleptic Gregorian calendar which extends the
7
- * Gregorian calendar backwards to year one.
8
- *
9
- * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
10
- * second table is needed for interpretation, using a [24-hour linear
11
- * smear](https://developers.google.com/time/smear).
12
- *
13
- * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
14
- * restricting to that range, we ensure that we can convert to and from [RFC
15
- * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
16
- *
17
- * # Examples
18
- *
19
- * Example 1: Compute Timestamp from POSIX `time()`.
20
- *
21
- * Timestamp timestamp;
22
- * timestamp.set_seconds(time(NULL));
23
- * timestamp.set_nanos(0);
24
- *
25
- * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
26
- *
27
- * struct timeval tv;
28
- * gettimeofday(&tv, NULL);
29
- *
30
- * Timestamp timestamp;
31
- * timestamp.set_seconds(tv.tv_sec);
32
- * timestamp.set_nanos(tv.tv_usec * 1000);
33
- *
34
- * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
35
- *
36
- * FILETIME ft;
37
- * GetSystemTimeAsFileTime(&ft);
38
- * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
39
- *
40
- * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
41
- * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
42
- * Timestamp timestamp;
43
- * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
44
- * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
45
- *
46
- * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
47
- *
48
- * long millis = System.currentTimeMillis();
49
- *
50
- * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
51
- * .setNanos((int) ((millis % 1000) * 1000000)).build();
52
- *
53
- * Example 5: Compute Timestamp from Java `Instant.now()`.
54
- *
55
- * Instant now = Instant.now();
56
- *
57
- * Timestamp timestamp =
58
- * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
59
- * .setNanos(now.getNano()).build();
60
- *
61
- * Example 6: Compute Timestamp from current time in Python.
62
- *
63
- * timestamp = Timestamp()
64
- * timestamp.GetCurrentTime()
65
- *
66
- * # JSON Mapping
67
- *
68
- * In JSON format, the Timestamp type is encoded as a string in the
69
- * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
70
- * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
71
- * where {year} is always expressed using four digits while {month}, {day},
72
- * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
73
- * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
74
- * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
75
- * is required. A proto3 JSON serializer should always use UTC (as indicated by
76
- * "Z") when printing the Timestamp type and a proto3 JSON parser should be
77
- * able to accept both UTC and other timezones (as indicated by an offset).
78
- *
79
- * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
80
- * 01:30 UTC on January 15, 2017.
81
- *
82
- * In JavaScript, one can convert a Date object to this format using the
83
- * standard
84
- * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
85
- * method. In Python, a standard `datetime.datetime` object can be converted
86
- * to this format using
87
- * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
88
- * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
89
- * the Joda Time's [`ISODateTimeFormat.dateTime()`](
90
- * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
91
- * ) to obtain a formatter capable of generating timestamps in this format.
92
- */
93
- export interface Timestamp {
94
- /**
95
- * Represents seconds of UTC time since Unix epoch
96
- * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
97
- * 9999-12-31T23:59:59Z inclusive.
98
- */
99
- seconds: string;
100
- /**
101
- * Non-negative fractions of a second at nanosecond resolution. Negative
102
- * second values with fractions must still have non-negative nanos values
103
- * that count forward in time. Must be from 0 to 999,999,999
104
- * inclusive.
105
- */
106
- nanos: number;
107
- }
108
- export declare const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
@@ -1,11 +0,0 @@
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 v3.21.5
6
- // source: google/protobuf/timestamp.proto
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.GOOGLE_PROTOBUF_PACKAGE_NAME = exports.protobufPackage = void 0;
9
- /* eslint-disable */
10
- exports.protobufPackage = "google.protobuf";
11
- exports.GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
@@ -1,118 +0,0 @@
1
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
- // versions:
3
- // protoc-gen-ts_proto v1.181.2
4
- // protoc v3.21.5
5
- // source: google/protobuf/timestamp.proto
6
-
7
- /* eslint-disable */
8
-
9
- export const protobufPackage = "google.protobuf";
10
-
11
- /**
12
- * A Timestamp represents a point in time independent of any time zone or local
13
- * calendar, encoded as a count of seconds and fractions of seconds at
14
- * nanosecond resolution. The count is relative to an epoch at UTC midnight on
15
- * January 1, 1970, in the proleptic Gregorian calendar which extends the
16
- * Gregorian calendar backwards to year one.
17
- *
18
- * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
19
- * second table is needed for interpretation, using a [24-hour linear
20
- * smear](https://developers.google.com/time/smear).
21
- *
22
- * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
23
- * restricting to that range, we ensure that we can convert to and from [RFC
24
- * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
25
- *
26
- * # Examples
27
- *
28
- * Example 1: Compute Timestamp from POSIX `time()`.
29
- *
30
- * Timestamp timestamp;
31
- * timestamp.set_seconds(time(NULL));
32
- * timestamp.set_nanos(0);
33
- *
34
- * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
35
- *
36
- * struct timeval tv;
37
- * gettimeofday(&tv, NULL);
38
- *
39
- * Timestamp timestamp;
40
- * timestamp.set_seconds(tv.tv_sec);
41
- * timestamp.set_nanos(tv.tv_usec * 1000);
42
- *
43
- * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
44
- *
45
- * FILETIME ft;
46
- * GetSystemTimeAsFileTime(&ft);
47
- * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
48
- *
49
- * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
50
- * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
51
- * Timestamp timestamp;
52
- * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
53
- * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
54
- *
55
- * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
56
- *
57
- * long millis = System.currentTimeMillis();
58
- *
59
- * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
60
- * .setNanos((int) ((millis % 1000) * 1000000)).build();
61
- *
62
- * Example 5: Compute Timestamp from Java `Instant.now()`.
63
- *
64
- * Instant now = Instant.now();
65
- *
66
- * Timestamp timestamp =
67
- * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
68
- * .setNanos(now.getNano()).build();
69
- *
70
- * Example 6: Compute Timestamp from current time in Python.
71
- *
72
- * timestamp = Timestamp()
73
- * timestamp.GetCurrentTime()
74
- *
75
- * # JSON Mapping
76
- *
77
- * In JSON format, the Timestamp type is encoded as a string in the
78
- * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
79
- * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
80
- * where {year} is always expressed using four digits while {month}, {day},
81
- * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
82
- * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
83
- * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
84
- * is required. A proto3 JSON serializer should always use UTC (as indicated by
85
- * "Z") when printing the Timestamp type and a proto3 JSON parser should be
86
- * able to accept both UTC and other timezones (as indicated by an offset).
87
- *
88
- * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
89
- * 01:30 UTC on January 15, 2017.
90
- *
91
- * In JavaScript, one can convert a Date object to this format using the
92
- * standard
93
- * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
94
- * method. In Python, a standard `datetime.datetime` object can be converted
95
- * to this format using
96
- * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
97
- * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
98
- * the Joda Time's [`ISODateTimeFormat.dateTime()`](
99
- * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
100
- * ) to obtain a formatter capable of generating timestamps in this format.
101
- */
102
- export interface Timestamp {
103
- /**
104
- * Represents seconds of UTC time since Unix epoch
105
- * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
106
- * 9999-12-31T23:59:59Z inclusive.
107
- */
108
- seconds: string;
109
- /**
110
- * Non-negative fractions of a second at nanosecond resolution. Negative
111
- * second values with fractions must still have non-negative nanos values
112
- * that count forward in time. Must be from 0 to 999,999,999
113
- * inclusive.
114
- */
115
- nanos: number;
116
- }
117
-
118
- export const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";