@wenlarge/communication 1.3.6 → 1.3.7
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.
- package/dist/generated/auth.d.ts +4 -13
- package/dist/generated/billing.d.ts +77 -0
- package/dist/generated/billing.js +34 -0
- package/package.json +51 -51
- package/proto/auth.proto +113 -124
- package/proto/billing.proto +79 -0
- package/proto/executor-core.proto +21 -21
- package/proto/notification.proto +22 -22
- package/proto/project.proto +116 -116
- package/proto/workflow.proto +186 -186
- package/src/generated/auth.ts +4 -21
- package/src/generated/billing.ts +144 -0
- package/src/generated/common.ts +16 -16
package/dist/generated/auth.d.ts
CHANGED
|
@@ -32,11 +32,6 @@ export interface InviteToCompanyRequest {
|
|
|
32
32
|
companyId: string;
|
|
33
33
|
email: string;
|
|
34
34
|
}
|
|
35
|
-
export interface InviteToCompanyResponse {
|
|
36
|
-
id: string;
|
|
37
|
-
companyId: string;
|
|
38
|
-
email: string;
|
|
39
|
-
}
|
|
40
35
|
export interface UpdateUserRequest {
|
|
41
36
|
name: string;
|
|
42
37
|
email: string;
|
|
@@ -48,10 +43,6 @@ export interface UpdateInviteStatusRequest {
|
|
|
48
43
|
userId: string;
|
|
49
44
|
status: string;
|
|
50
45
|
}
|
|
51
|
-
export interface UpdateInviteStatusResponse {
|
|
52
|
-
id: string;
|
|
53
|
-
status: string;
|
|
54
|
-
}
|
|
55
46
|
export interface GetMeResponse {
|
|
56
47
|
id: string;
|
|
57
48
|
name: string;
|
|
@@ -94,9 +85,9 @@ export interface AuthServiceClient {
|
|
|
94
85
|
login(request: LoginRequest, metadata?: Metadata): Observable<LoginResponse>;
|
|
95
86
|
register(request: RegisterRequest, metadata?: Metadata): Observable<Empty>;
|
|
96
87
|
getMe(request: GetMeRequest, metadata?: Metadata): Observable<GetMeResponse>;
|
|
97
|
-
inviteToCompany(request: InviteToCompanyRequest, metadata?: Metadata): Observable<
|
|
88
|
+
inviteToCompany(request: InviteToCompanyRequest, metadata?: Metadata): Observable<Empty>;
|
|
98
89
|
updateUser(request: UpdateUserRequest, metadata?: Metadata): Observable<Empty>;
|
|
99
|
-
updateInviteStatus(request: UpdateInviteStatusRequest, metadata?: Metadata): Observable<
|
|
90
|
+
updateInviteStatus(request: UpdateInviteStatusRequest, metadata?: Metadata): Observable<Empty>;
|
|
100
91
|
getCompanyUsers(request: GetCompanyUsersRequest, metadata?: Metadata): Observable<GetCompanyUsersResponse>;
|
|
101
92
|
removeUserFromCompany(request: RemoveUserFromCompanyRequest, metadata?: Metadata): Observable<Empty>;
|
|
102
93
|
refreshToken(request: RefreshTokenRequest, metadata?: Metadata): Observable<LoginResponse>;
|
|
@@ -107,9 +98,9 @@ export interface AuthServiceController {
|
|
|
107
98
|
login(request: LoginRequest, metadata?: Metadata): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
|
|
108
99
|
register(request: RegisterRequest, metadata?: Metadata): void;
|
|
109
100
|
getMe(request: GetMeRequest, metadata?: Metadata): Promise<GetMeResponse> | Observable<GetMeResponse> | GetMeResponse;
|
|
110
|
-
inviteToCompany(request: InviteToCompanyRequest, metadata?: Metadata):
|
|
101
|
+
inviteToCompany(request: InviteToCompanyRequest, metadata?: Metadata): void;
|
|
111
102
|
updateUser(request: UpdateUserRequest, metadata?: Metadata): void;
|
|
112
|
-
updateInviteStatus(request: UpdateInviteStatusRequest, metadata?: Metadata):
|
|
103
|
+
updateInviteStatus(request: UpdateInviteStatusRequest, metadata?: Metadata): void;
|
|
113
104
|
getCompanyUsers(request: GetCompanyUsersRequest, metadata?: Metadata): Promise<GetCompanyUsersResponse> | Observable<GetCompanyUsersResponse> | GetCompanyUsersResponse;
|
|
114
105
|
removeUserFromCompany(request: RemoveUserFromCompanyRequest, metadata?: Metadata): void;
|
|
115
106
|
refreshToken(request: RefreshTokenRequest, metadata?: Metadata): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Metadata } from "@grpc/grpc-js";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { Empty } from "./google/protobuf/empty";
|
|
4
|
+
export declare const protobufPackage = "billing";
|
|
5
|
+
export interface AssignWelcomeGrantRequest {
|
|
6
|
+
companyId: string;
|
|
7
|
+
email: string;
|
|
8
|
+
}
|
|
9
|
+
export interface CheckQuotaRequest {
|
|
10
|
+
companyId: string;
|
|
11
|
+
workflowId: string;
|
|
12
|
+
nodeId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface CheckQuotaResponse {
|
|
15
|
+
companyId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GetBillingStatusRequest {
|
|
18
|
+
companyId: string;
|
|
19
|
+
}
|
|
20
|
+
export interface GetBillingStatusResponse {
|
|
21
|
+
totalAllowance: number;
|
|
22
|
+
used: number;
|
|
23
|
+
remaining: number;
|
|
24
|
+
data: GrantInfo[];
|
|
25
|
+
}
|
|
26
|
+
export interface GrantInfo {
|
|
27
|
+
grantId: string;
|
|
28
|
+
grantType: string;
|
|
29
|
+
status: string;
|
|
30
|
+
nodeAllowance: number;
|
|
31
|
+
used: number;
|
|
32
|
+
validFrom: string;
|
|
33
|
+
validUntil: string;
|
|
34
|
+
}
|
|
35
|
+
export interface FindManyPlanResponse {
|
|
36
|
+
data: PlanInfo[];
|
|
37
|
+
}
|
|
38
|
+
export interface PlanInfo {
|
|
39
|
+
slug: string;
|
|
40
|
+
name: string;
|
|
41
|
+
includedNodeUnits: number;
|
|
42
|
+
billingInterval: string;
|
|
43
|
+
priceCents: number;
|
|
44
|
+
stripePriceId: string;
|
|
45
|
+
}
|
|
46
|
+
export interface CreateCheckoutSessionRequest {
|
|
47
|
+
companyId: string;
|
|
48
|
+
planSlug: string;
|
|
49
|
+
successUrl: string;
|
|
50
|
+
cancelUrl: string;
|
|
51
|
+
}
|
|
52
|
+
export interface CreateCheckoutSessionResponse {
|
|
53
|
+
checkoutUrl: string;
|
|
54
|
+
}
|
|
55
|
+
export interface CancelGrantRequest {
|
|
56
|
+
grantId: string;
|
|
57
|
+
companyId: string;
|
|
58
|
+
}
|
|
59
|
+
export declare const BILLING_PACKAGE_NAME = "billing";
|
|
60
|
+
export interface BillingServiceClient {
|
|
61
|
+
assignWelcomeGrant(request: AssignWelcomeGrantRequest, metadata?: Metadata): Observable<Empty>;
|
|
62
|
+
checkQuota(request: CheckQuotaRequest, metadata?: Metadata): Observable<Empty>;
|
|
63
|
+
getBillingStatus(request: GetBillingStatusRequest, metadata?: Metadata): Observable<GetBillingStatusResponse>;
|
|
64
|
+
findManyPlan(request: Empty, metadata?: Metadata): Observable<FindManyPlanResponse>;
|
|
65
|
+
createCheckoutSession(request: CreateCheckoutSessionRequest, metadata?: Metadata): Observable<CreateCheckoutSessionResponse>;
|
|
66
|
+
cancelGrant(request: CancelGrantRequest, metadata?: Metadata): Observable<Empty>;
|
|
67
|
+
}
|
|
68
|
+
export interface BillingServiceController {
|
|
69
|
+
assignWelcomeGrant(request: AssignWelcomeGrantRequest, metadata?: Metadata): void;
|
|
70
|
+
checkQuota(request: CheckQuotaRequest, metadata?: Metadata): void;
|
|
71
|
+
getBillingStatus(request: GetBillingStatusRequest, metadata?: Metadata): Promise<GetBillingStatusResponse> | Observable<GetBillingStatusResponse> | GetBillingStatusResponse;
|
|
72
|
+
findManyPlan(request: Empty, metadata?: Metadata): Promise<FindManyPlanResponse> | Observable<FindManyPlanResponse> | FindManyPlanResponse;
|
|
73
|
+
createCheckoutSession(request: CreateCheckoutSessionRequest, metadata?: Metadata): Promise<CreateCheckoutSessionResponse> | Observable<CreateCheckoutSessionResponse> | CreateCheckoutSessionResponse;
|
|
74
|
+
cancelGrant(request: CancelGrantRequest, metadata?: Metadata): void;
|
|
75
|
+
}
|
|
76
|
+
export declare function BillingServiceControllerMethods(): (constructor: Function) => void;
|
|
77
|
+
export declare const BILLING_SERVICE_NAME = "BillingService";
|
|
@@ -0,0 +1,34 @@
|
|
|
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: billing.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.BILLING_SERVICE_NAME = exports.BILLING_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
exports.BillingServiceControllerMethods = BillingServiceControllerMethods;
|
|
10
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
11
|
+
exports.protobufPackage = "billing";
|
|
12
|
+
exports.BILLING_PACKAGE_NAME = "billing";
|
|
13
|
+
function BillingServiceControllerMethods() {
|
|
14
|
+
return function (constructor) {
|
|
15
|
+
const grpcMethods = [
|
|
16
|
+
"assignWelcomeGrant",
|
|
17
|
+
"checkQuota",
|
|
18
|
+
"getBillingStatus",
|
|
19
|
+
"findManyPlan",
|
|
20
|
+
"createCheckoutSession",
|
|
21
|
+
"cancelGrant",
|
|
22
|
+
];
|
|
23
|
+
for (const method of grpcMethods) {
|
|
24
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
25
|
+
(0, microservices_1.GrpcMethod)("BillingService", method)(constructor.prototype[method], method, descriptor);
|
|
26
|
+
}
|
|
27
|
+
const grpcStreamMethods = [];
|
|
28
|
+
for (const method of grpcStreamMethods) {
|
|
29
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
30
|
+
(0, microservices_1.GrpcStreamMethod)("BillingService", method)(constructor.prototype[method], method, descriptor);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
exports.BILLING_SERVICE_NAME = "BillingService";
|
package/package.json
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@wenlarge/communication",
|
|
3
|
-
"version": "1.3.
|
|
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=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
|
-
"expr-eval": "^2.0.2",
|
|
39
|
-
"rxjs": "^7.8.1"
|
|
40
|
-
},
|
|
41
|
-
"devDependencies": {
|
|
42
|
-
"@bufbuild/buf": "^1.66.1",
|
|
43
|
-
"@nestjs/microservices": "^10.4.20",
|
|
44
|
-
"@types/node": "^24.9.1",
|
|
45
|
-
"ts-proto": "^1.152.2",
|
|
46
|
-
"typescript": "^5.3.3"
|
|
47
|
-
},
|
|
48
|
-
"peerDependencies": {
|
|
49
|
-
"@grpc/grpc-js": "^1.14.1"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@wenlarge/communication",
|
|
3
|
+
"version": "1.3.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": "npx protoc --plugin=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
|
+
"expr-eval": "^2.0.2",
|
|
39
|
+
"rxjs": "^7.8.1"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@bufbuild/buf": "^1.66.1",
|
|
43
|
+
"@nestjs/microservices": "^10.4.20",
|
|
44
|
+
"@types/node": "^24.9.1",
|
|
45
|
+
"ts-proto": "^1.152.2",
|
|
46
|
+
"typescript": "^5.3.3"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"@grpc/grpc-js": "^1.14.1"
|
|
50
|
+
}
|
|
51
|
+
}
|
package/proto/auth.proto
CHANGED
|
@@ -1,125 +1,114 @@
|
|
|
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 (
|
|
12
|
-
rpc UpdateUser (UpdateUserRequest) returns (google.protobuf.Empty);
|
|
13
|
-
rpc UpdateInviteStatus (UpdateInviteStatusRequest) returns (
|
|
14
|
-
rpc GetCompanyUsers (GetCompanyUsersRequest) returns (GetCompanyUsersResponse);
|
|
15
|
-
rpc RemoveUserFromCompany (RemoveUserFromCompanyRequest) returns (google.protobuf.Empty);
|
|
16
|
-
rpc RefreshToken (RefreshTokenRequest) returns (LoginResponse);
|
|
17
|
-
rpc ForgotPassword (ForgotPasswordRequest) returns (google.protobuf.Empty);
|
|
18
|
-
rpc ResetPassword (ResetPasswordRequest) returns (google.protobuf.Empty);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
message LoginRequest {
|
|
22
|
-
string email = 1;
|
|
23
|
-
string password = 2;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
message LoginResponse {
|
|
27
|
-
string jwt = 1;
|
|
28
|
-
string expiresIn = 2;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
message RegisterRequest {
|
|
32
|
-
string name = 1;
|
|
33
|
-
string email = 2;
|
|
34
|
-
string password = 3;
|
|
35
|
-
string gsm = 4;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
message GetMeRequest {
|
|
39
|
-
string jwt = 1;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
message Company {
|
|
43
|
-
string id = 1;
|
|
44
|
-
string name = 2;
|
|
45
|
-
string createdAt = 3;
|
|
46
|
-
string updatedAt = 4;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
message CompanyUser {
|
|
50
|
-
Company company = 1;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
message InviteToCompanyRequest {
|
|
54
|
-
string companyId = 1;
|
|
55
|
-
string email = 2;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
message
|
|
59
|
-
string
|
|
60
|
-
string
|
|
61
|
-
string
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
string
|
|
67
|
-
string
|
|
68
|
-
string
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
message
|
|
72
|
-
string
|
|
73
|
-
string
|
|
74
|
-
string
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
string
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
string
|
|
87
|
-
string
|
|
88
|
-
|
|
89
|
-
string
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
string
|
|
100
|
-
string
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
message RefreshTokenRequest {
|
|
115
|
-
string userId = 1;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
message ForgotPasswordRequest {
|
|
119
|
-
string email = 1;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
message ResetPasswordRequest {
|
|
123
|
-
string token = 1;
|
|
124
|
-
string newPassword = 2;
|
|
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 (google.protobuf.Empty);
|
|
12
|
+
rpc UpdateUser (UpdateUserRequest) returns (google.protobuf.Empty);
|
|
13
|
+
rpc UpdateInviteStatus (UpdateInviteStatusRequest) returns (google.protobuf.Empty);
|
|
14
|
+
rpc GetCompanyUsers (GetCompanyUsersRequest) returns (GetCompanyUsersResponse);
|
|
15
|
+
rpc RemoveUserFromCompany (RemoveUserFromCompanyRequest) returns (google.protobuf.Empty);
|
|
16
|
+
rpc RefreshToken (RefreshTokenRequest) returns (LoginResponse);
|
|
17
|
+
rpc ForgotPassword (ForgotPasswordRequest) returns (google.protobuf.Empty);
|
|
18
|
+
rpc ResetPassword (ResetPasswordRequest) returns (google.protobuf.Empty);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message LoginRequest {
|
|
22
|
+
string email = 1;
|
|
23
|
+
string password = 2;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message LoginResponse {
|
|
27
|
+
string jwt = 1;
|
|
28
|
+
string expiresIn = 2;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message RegisterRequest {
|
|
32
|
+
string name = 1;
|
|
33
|
+
string email = 2;
|
|
34
|
+
string password = 3;
|
|
35
|
+
string gsm = 4;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message GetMeRequest {
|
|
39
|
+
string jwt = 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message Company {
|
|
43
|
+
string id = 1;
|
|
44
|
+
string name = 2;
|
|
45
|
+
string createdAt = 3;
|
|
46
|
+
string updatedAt = 4;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message CompanyUser {
|
|
50
|
+
Company company = 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message InviteToCompanyRequest {
|
|
54
|
+
string companyId = 1;
|
|
55
|
+
string email = 2;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message UpdateUserRequest {
|
|
59
|
+
string name = 1;
|
|
60
|
+
string email = 2;
|
|
61
|
+
string gsm = 3;
|
|
62
|
+
string password = 4;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message UpdateInviteStatusRequest{
|
|
66
|
+
string inviteId = 1;
|
|
67
|
+
string userId =2;
|
|
68
|
+
string status = 3;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message GetMeResponse {
|
|
72
|
+
string id = 1;
|
|
73
|
+
string name = 2;
|
|
74
|
+
string email = 3;
|
|
75
|
+
string createdAt = 4;
|
|
76
|
+
string updatedAt = 5;
|
|
77
|
+
repeated CompanyUser companyUsersOnUser = 6;
|
|
78
|
+
string gsm = 7;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
message GetCompanyUsersRequest {
|
|
82
|
+
string companyId = 1;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
message CompanyUserDetail {
|
|
86
|
+
string userId = 1;
|
|
87
|
+
string userName = 2;
|
|
88
|
+
string userEmail = 3;
|
|
89
|
+
string joinedAt = 4;
|
|
90
|
+
bool isOwner = 5;
|
|
91
|
+
string gsm = 6;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
message GetCompanyUsersResponse {
|
|
95
|
+
repeated CompanyUserDetail users = 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
message RemoveUserFromCompanyRequest {
|
|
99
|
+
string companyId = 1;
|
|
100
|
+
string userId = 2;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
message RefreshTokenRequest {
|
|
104
|
+
string userId = 1;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
message ForgotPasswordRequest {
|
|
108
|
+
string email = 1;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
message ResetPasswordRequest {
|
|
112
|
+
string token = 1;
|
|
113
|
+
string newPassword = 2;
|
|
125
114
|
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "google/protobuf/empty.proto";
|
|
4
|
+
package billing;
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
service BillingService {
|
|
8
|
+
rpc AssignWelcomeGrant(AssignWelcomeGrantRequest) returns (google.protobuf.Empty);
|
|
9
|
+
rpc CheckQuota(CheckQuotaRequest) returns (google.protobuf.Empty);
|
|
10
|
+
rpc GetBillingStatus(GetBillingStatusRequest) returns (GetBillingStatusResponse);
|
|
11
|
+
rpc FindManyPlan (google.protobuf.Empty) returns (FindManyPlanResponse);
|
|
12
|
+
rpc CreateCheckoutSession(CreateCheckoutSessionRequest) returns (CreateCheckoutSessionResponse);
|
|
13
|
+
rpc CancelGrant(CancelGrantRequest) returns (google.protobuf.Empty);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message AssignWelcomeGrantRequest {
|
|
17
|
+
string companyId = 1;
|
|
18
|
+
string email = 2;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message CheckQuotaRequest {
|
|
22
|
+
string companyId = 1;
|
|
23
|
+
string workflowId = 2;
|
|
24
|
+
string nodeId = 3;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message CheckQuotaResponse {
|
|
28
|
+
string companyId = 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message GetBillingStatusRequest {
|
|
32
|
+
string companyId = 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message GetBillingStatusResponse {
|
|
36
|
+
int32 totalAllowance = 1;
|
|
37
|
+
int32 used = 2;
|
|
38
|
+
int32 remaining = 3;
|
|
39
|
+
repeated GrantInfo data = 4;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message GrantInfo {
|
|
43
|
+
string grantId = 1;
|
|
44
|
+
string grantType = 2;
|
|
45
|
+
string status = 3;
|
|
46
|
+
int32 nodeAllowance = 4;
|
|
47
|
+
int32 used = 5;
|
|
48
|
+
string validFrom = 6;
|
|
49
|
+
string validUntil = 7;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message FindManyPlanResponse {
|
|
53
|
+
repeated PlanInfo data = 1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
message PlanInfo {
|
|
57
|
+
string slug = 1;
|
|
58
|
+
string name = 2;
|
|
59
|
+
int32 includedNodeUnits = 3;
|
|
60
|
+
string billingInterval = 4;
|
|
61
|
+
int32 priceCents = 5;
|
|
62
|
+
string stripePriceId = 6;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message CreateCheckoutSessionRequest {
|
|
66
|
+
string companyId = 1;
|
|
67
|
+
string planSlug = 2;
|
|
68
|
+
string successUrl = 3;
|
|
69
|
+
string cancelUrl = 4;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
message CreateCheckoutSessionResponse {
|
|
73
|
+
string checkoutUrl = 1;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message CancelGrantRequest {
|
|
77
|
+
string grantId = 1;
|
|
78
|
+
string companyId = 2;
|
|
79
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package executor_core;
|
|
4
|
-
import "google/protobuf/struct.proto";
|
|
5
|
-
|
|
6
|
-
message ExecuteNodeRequest {
|
|
7
|
-
string nodeTypeId = 1;
|
|
8
|
-
string nodeId = 2;
|
|
9
|
-
google.protobuf.Struct config = 3;
|
|
10
|
-
google.protobuf.Struct inputSchema = 4;
|
|
11
|
-
google.protobuf.Struct env = 5;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
message ExecuteNodeResponse {
|
|
15
|
-
google.protobuf.Struct output = 1;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
service CoreExecutionService {
|
|
19
|
-
rpc ExecuteNode (ExecuteNodeRequest) returns (ExecuteNodeResponse);
|
|
20
|
-
|
|
21
|
-
}
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package executor_core;
|
|
4
|
+
import "google/protobuf/struct.proto";
|
|
5
|
+
|
|
6
|
+
message ExecuteNodeRequest {
|
|
7
|
+
string nodeTypeId = 1;
|
|
8
|
+
string nodeId = 2;
|
|
9
|
+
google.protobuf.Struct config = 3;
|
|
10
|
+
google.protobuf.Struct inputSchema = 4;
|
|
11
|
+
google.protobuf.Struct env = 5;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message ExecuteNodeResponse {
|
|
15
|
+
google.protobuf.Struct output = 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
service CoreExecutionService {
|
|
19
|
+
rpc ExecuteNode (ExecuteNodeRequest) returns (ExecuteNodeResponse);
|
|
20
|
+
|
|
21
|
+
}
|
package/proto/notification.proto
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
import "google/protobuf/empty.proto";
|
|
4
|
-
|
|
5
|
-
package notification;
|
|
6
|
-
|
|
7
|
-
service NotificationService {
|
|
8
|
-
rpc AddMail (AddMailRequest) returns (google.protobuf.Empty);
|
|
9
|
-
rpc AddSms (AddSmsRequest) returns (google.protobuf.Empty);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
message AddMailRequest {
|
|
13
|
-
string to = 1;
|
|
14
|
-
string subject = 2;
|
|
15
|
-
string text = 3;
|
|
16
|
-
string html = 4;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
message AddSmsRequest {
|
|
20
|
-
string to = 1;
|
|
21
|
-
string body = 2;
|
|
22
|
-
}
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "google/protobuf/empty.proto";
|
|
4
|
+
|
|
5
|
+
package notification;
|
|
6
|
+
|
|
7
|
+
service NotificationService {
|
|
8
|
+
rpc AddMail (AddMailRequest) returns (google.protobuf.Empty);
|
|
9
|
+
rpc AddSms (AddSmsRequest) returns (google.protobuf.Empty);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
message AddMailRequest {
|
|
13
|
+
string to = 1;
|
|
14
|
+
string subject = 2;
|
|
15
|
+
string text = 3;
|
|
16
|
+
string html = 4;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message AddSmsRequest {
|
|
20
|
+
string to = 1;
|
|
21
|
+
string body = 2;
|
|
22
|
+
}
|