@wenlarge/communication 1.5.7 → 1.6.0
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 +12 -0
- package/dist/generated/auth.js +9 -1
- package/package.json +47 -51
- package/proto/auth.proto +160 -148
- package/proto/billing.proto +82 -82
- package/proto/executor-core.proto +21 -21
- package/proto/notification.proto +22 -22
- package/proto/project.proto +121 -121
- package/proto/workflow.proto +191 -191
- package/src/generated/auth.ts +20 -0
- package/src/generated/common.ts +16 -16
package/dist/generated/auth.d.ts
CHANGED
|
@@ -2,6 +2,12 @@ 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 = "auth";
|
|
5
|
+
export declare enum OAuthProvider {
|
|
6
|
+
OAUTH_PROVIDER_UNSPECIFIED = "OAUTH_PROVIDER_UNSPECIFIED",
|
|
7
|
+
GOOGLE = "GOOGLE",
|
|
8
|
+
MICROSOFT = "MICROSOFT",
|
|
9
|
+
UNRECOGNIZED = "UNRECOGNIZED"
|
|
10
|
+
}
|
|
5
11
|
export interface LoginRequest {
|
|
6
12
|
email: string;
|
|
7
13
|
password: string;
|
|
@@ -104,6 +110,10 @@ export interface Invite {
|
|
|
104
110
|
export interface ReSendInviteRequest {
|
|
105
111
|
inviteId: string;
|
|
106
112
|
}
|
|
113
|
+
export interface OAuthLoginRequest {
|
|
114
|
+
provider: OAuthProvider;
|
|
115
|
+
idToken: string;
|
|
116
|
+
}
|
|
107
117
|
export declare const AUTH_PACKAGE_NAME = "auth";
|
|
108
118
|
export interface AuthServiceClient {
|
|
109
119
|
login(request: LoginRequest, metadata?: Metadata): Observable<LoginResponse>;
|
|
@@ -122,6 +132,7 @@ export interface AuthServiceClient {
|
|
|
122
132
|
leaveCompany(request: Empty, metadata?: Metadata): Observable<Empty>;
|
|
123
133
|
getInvites(request: GetInviteRequest, metadata?: Metadata): Observable<GetInviteResponse>;
|
|
124
134
|
reSendInvite(request: ReSendInviteRequest, metadata?: Metadata): Observable<Empty>;
|
|
135
|
+
oAuthLogin(request: OAuthLoginRequest, metadata?: Metadata): Observable<LoginResponse>;
|
|
125
136
|
}
|
|
126
137
|
export interface AuthServiceController {
|
|
127
138
|
login(request: LoginRequest, metadata?: Metadata): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
|
|
@@ -140,6 +151,7 @@ export interface AuthServiceController {
|
|
|
140
151
|
leaveCompany(request: Empty, metadata?: Metadata): void;
|
|
141
152
|
getInvites(request: GetInviteRequest, metadata?: Metadata): Promise<GetInviteResponse> | Observable<GetInviteResponse> | GetInviteResponse;
|
|
142
153
|
reSendInvite(request: ReSendInviteRequest, metadata?: Metadata): void;
|
|
154
|
+
oAuthLogin(request: OAuthLoginRequest, metadata?: Metadata): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
|
|
143
155
|
}
|
|
144
156
|
export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
|
|
145
157
|
export declare const AUTH_SERVICE_NAME = "AuthService";
|
package/dist/generated/auth.js
CHANGED
|
@@ -5,10 +5,17 @@
|
|
|
5
5
|
// protoc v4.25.9
|
|
6
6
|
// source: auth.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.AUTH_SERVICE_NAME = exports.AUTH_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
8
|
+
exports.AUTH_SERVICE_NAME = exports.AUTH_PACKAGE_NAME = exports.OAuthProvider = exports.protobufPackage = void 0;
|
|
9
9
|
exports.AuthServiceControllerMethods = AuthServiceControllerMethods;
|
|
10
10
|
const microservices_1 = require("@nestjs/microservices");
|
|
11
11
|
exports.protobufPackage = "auth";
|
|
12
|
+
var OAuthProvider;
|
|
13
|
+
(function (OAuthProvider) {
|
|
14
|
+
OAuthProvider["OAUTH_PROVIDER_UNSPECIFIED"] = "OAUTH_PROVIDER_UNSPECIFIED";
|
|
15
|
+
OAuthProvider["GOOGLE"] = "GOOGLE";
|
|
16
|
+
OAuthProvider["MICROSOFT"] = "MICROSOFT";
|
|
17
|
+
OAuthProvider["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
18
|
+
})(OAuthProvider || (exports.OAuthProvider = OAuthProvider = {}));
|
|
12
19
|
exports.AUTH_PACKAGE_NAME = "auth";
|
|
13
20
|
function AuthServiceControllerMethods() {
|
|
14
21
|
return function (constructor) {
|
|
@@ -29,6 +36,7 @@ function AuthServiceControllerMethods() {
|
|
|
29
36
|
"leaveCompany",
|
|
30
37
|
"getInvites",
|
|
31
38
|
"reSendInvite",
|
|
39
|
+
"oAuthLogin",
|
|
32
40
|
];
|
|
33
41
|
for (const method of grpcMethods) {
|
|
34
42
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/package.json
CHANGED
|
@@ -1,51 +1,47 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@wenlarge/communication",
|
|
3
|
-
"version": "1.
|
|
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
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"peerDependencies": {
|
|
49
|
-
"@grpc/grpc-js": "^1.14.1"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@wenlarge/communication",
|
|
3
|
+
"version": "1.6.0",
|
|
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
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@grpc/grpc-js": "^1.14.1",
|
|
33
|
+
"@grpc/proto-loader": "^0.7.15",
|
|
34
|
+
"expr-eval": "^2.0.2",
|
|
35
|
+
"rxjs": "^7.8.1"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@bufbuild/buf": "^1.66.1",
|
|
39
|
+
"@nestjs/microservices": "^10.4.20",
|
|
40
|
+
"@types/node": "^24.9.1",
|
|
41
|
+
"ts-proto": "^1.152.2",
|
|
42
|
+
"typescript": "^5.3.3"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"@grpc/grpc-js": "^1.14.1"
|
|
46
|
+
}
|
|
47
|
+
}
|
package/proto/auth.proto
CHANGED
|
@@ -1,149 +1,161 @@
|
|
|
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
|
-
rpc AddCompany (AddCompanyRequest) returns (google.protobuf.Empty);
|
|
20
|
-
rpc UpdateCompany (UpdateCompanyRequest) returns (google.protobuf.Empty);
|
|
21
|
-
rpc LeaveCompany (google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
22
|
-
rpc GetInvites (GetInviteRequest) returns (GetInviteResponse);
|
|
23
|
-
rpc ReSendInvite (ReSendInviteRequest) returns (google.protobuf.Empty);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
string
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
string
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
string
|
|
39
|
-
string
|
|
40
|
-
string
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
string
|
|
50
|
-
string
|
|
51
|
-
string
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
string
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
string
|
|
66
|
-
string
|
|
67
|
-
string
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
string
|
|
73
|
-
string
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
string
|
|
79
|
-
string
|
|
80
|
-
string
|
|
81
|
-
string
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
string
|
|
93
|
-
string
|
|
94
|
-
string
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
string
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
string
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
int32
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
string
|
|
142
|
-
string
|
|
143
|
-
string
|
|
144
|
-
string
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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
|
+
rpc AddCompany (AddCompanyRequest) returns (google.protobuf.Empty);
|
|
20
|
+
rpc UpdateCompany (UpdateCompanyRequest) returns (google.protobuf.Empty);
|
|
21
|
+
rpc LeaveCompany (google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
22
|
+
rpc GetInvites (GetInviteRequest) returns (GetInviteResponse);
|
|
23
|
+
rpc ReSendInvite (ReSendInviteRequest) returns (google.protobuf.Empty);
|
|
24
|
+
rpc OAuthLogin (OAuthLoginRequest) returns (LoginResponse);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message LoginRequest {
|
|
28
|
+
string email = 1;
|
|
29
|
+
string password = 2;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
message LoginResponse {
|
|
33
|
+
string jwt = 1;
|
|
34
|
+
string expiresIn = 2;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message RegisterRequest {
|
|
38
|
+
string name = 1;
|
|
39
|
+
string email = 2;
|
|
40
|
+
string password = 3;
|
|
41
|
+
string gsm = 4;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
message GetMeRequest {
|
|
45
|
+
string jwt = 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message Company {
|
|
49
|
+
string id = 1;
|
|
50
|
+
string name = 2;
|
|
51
|
+
string createdAt = 3;
|
|
52
|
+
string updatedAt = 4;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
message CompanyUser {
|
|
56
|
+
Company company = 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message InviteToCompanyRequest {
|
|
60
|
+
string companyId = 1;
|
|
61
|
+
string email = 2;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message UpdateUserRequest {
|
|
65
|
+
string name = 1;
|
|
66
|
+
string email = 2;
|
|
67
|
+
string gsm = 3;
|
|
68
|
+
string password = 4;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message UpdateInviteStatusRequest{
|
|
72
|
+
string inviteId = 1;
|
|
73
|
+
string userId =2;
|
|
74
|
+
string status = 3;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
message GetMeResponse {
|
|
78
|
+
string id = 1;
|
|
79
|
+
string name = 2;
|
|
80
|
+
string email = 3;
|
|
81
|
+
string createdAt = 4;
|
|
82
|
+
string updatedAt = 5;
|
|
83
|
+
repeated CompanyUser companyUsersOnUser = 6;
|
|
84
|
+
string gsm = 7;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
message GetCompanyUsersRequest {
|
|
88
|
+
string companyId = 1;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
message CompanyUserDetail {
|
|
92
|
+
string userId = 1;
|
|
93
|
+
string userName = 2;
|
|
94
|
+
string userEmail = 3;
|
|
95
|
+
string joinedAt = 4;
|
|
96
|
+
bool isOwner = 5;
|
|
97
|
+
string gsm = 6;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
message GetCompanyUsersResponse {
|
|
101
|
+
repeated CompanyUserDetail users = 1;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
message RemoveUserFromCompanyRequest {
|
|
105
|
+
string companyId = 1;
|
|
106
|
+
string userId = 2;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
message RefreshTokenRequest {
|
|
110
|
+
string userId = 1;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
message ForgotPasswordRequest {
|
|
114
|
+
string email = 1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
message ResetPasswordRequest {
|
|
118
|
+
string token = 1;
|
|
119
|
+
string newPassword = 2;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
message AddCompanyRequest {
|
|
123
|
+
string name = 1;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
message UpdateCompanyRequest {
|
|
127
|
+
string name = 1;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
message GetInviteRequest {
|
|
131
|
+
int32 skip = 1;
|
|
132
|
+
int32 take = 2;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
message GetInviteResponse {
|
|
136
|
+
repeated Invite invites = 1;
|
|
137
|
+
int32 total = 2;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
message Invite {
|
|
141
|
+
string id = 1;
|
|
142
|
+
string companyId = 2;
|
|
143
|
+
string email = 3;
|
|
144
|
+
string status = 4;
|
|
145
|
+
string createdAt = 5;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
message ReSendInviteRequest {
|
|
149
|
+
string inviteId = 1;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
enum OAuthProvider {
|
|
153
|
+
OAUTH_PROVIDER_UNSPECIFIED = 0;
|
|
154
|
+
GOOGLE = 1;
|
|
155
|
+
MICROSOFT = 2;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
message OAuthLoginRequest {
|
|
159
|
+
OAuthProvider provider = 1;
|
|
160
|
+
string id_token = 2;
|
|
149
161
|
}
|
package/proto/billing.proto
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
import "google/protobuf/empty.proto";
|
|
4
|
-
package billing;
|
|
5
|
-
|
|
6
|
-
service BillingService {
|
|
7
|
-
rpc AssignWelcomeGrant(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
8
|
-
rpc CheckQuota(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
9
|
-
rpc GetBillingStatus(google.protobuf.Empty) returns (GetBillingStatusResponse);
|
|
10
|
-
rpc FindManyPlan (google.protobuf.Empty) returns (FindManyPlanResponse);
|
|
11
|
-
rpc CreateCheckoutSession(CreateCheckoutSessionRequest) returns (CreateCheckoutSessionResponse);
|
|
12
|
-
rpc CancelGrant(CancelGrantRequest) returns (google.protobuf.Empty);
|
|
13
|
-
rpc FindManyEntitlementGrant(FindManyEntitlementGrantRequest) returns (FindManyEntitlementGrantResponse);
|
|
14
|
-
rpc GetNodeCount(google.protobuf.Empty) returns (GetNodeCountResponse);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
message GetBillingStatusResponse {
|
|
18
|
-
int32 totalAllowance = 1;
|
|
19
|
-
int32 used = 2;
|
|
20
|
-
int32 remaining = 3;
|
|
21
|
-
repeated GrantInfo data = 4;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
message GrantInfo {
|
|
25
|
-
string grantId = 1;
|
|
26
|
-
string grantType = 2;
|
|
27
|
-
string status = 3;
|
|
28
|
-
int32 nodeAllowance = 4;
|
|
29
|
-
int32 used = 5;
|
|
30
|
-
string validFrom = 6;
|
|
31
|
-
string validUntil = 7;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
message FindManyPlanResponse {
|
|
35
|
-
repeated PlanInfo data = 1;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
message PlanInfo {
|
|
39
|
-
string slug = 1;
|
|
40
|
-
string name = 2;
|
|
41
|
-
int32 includedNodeUnits = 3;
|
|
42
|
-
string billingInterval = 4;
|
|
43
|
-
int32 priceCents = 5;
|
|
44
|
-
string stripePriceId = 6;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
message CreateCheckoutSessionRequest {
|
|
48
|
-
string planSlug = 1;
|
|
49
|
-
string successUrl = 2;
|
|
50
|
-
string cancelUrl = 3;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
message CreateCheckoutSessionResponse {
|
|
54
|
-
string checkoutUrl = 1;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
message CancelGrantRequest {
|
|
58
|
-
string grantId = 1;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
message FindManyEntitlementGrantRequest {
|
|
62
|
-
int32 skip = 1;
|
|
63
|
-
int32 take = 2;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
message FindManyEntitlementGrantResponse {
|
|
67
|
-
repeated EntitlementGrantInfo data = 1;
|
|
68
|
-
int32 total = 2;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
message EntitlementGrantInfo {
|
|
72
|
-
string grantId = 1;
|
|
73
|
-
string grantType = 2;
|
|
74
|
-
string status = 3;
|
|
75
|
-
int32 nodeAllowance = 4;
|
|
76
|
-
int32 used = 5;
|
|
77
|
-
string validFrom = 6;
|
|
78
|
-
string validUntil = 7;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
message GetNodeCountResponse {
|
|
82
|
-
int32 nodeCount = 1;
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "google/protobuf/empty.proto";
|
|
4
|
+
package billing;
|
|
5
|
+
|
|
6
|
+
service BillingService {
|
|
7
|
+
rpc AssignWelcomeGrant(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
8
|
+
rpc CheckQuota(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
9
|
+
rpc GetBillingStatus(google.protobuf.Empty) returns (GetBillingStatusResponse);
|
|
10
|
+
rpc FindManyPlan (google.protobuf.Empty) returns (FindManyPlanResponse);
|
|
11
|
+
rpc CreateCheckoutSession(CreateCheckoutSessionRequest) returns (CreateCheckoutSessionResponse);
|
|
12
|
+
rpc CancelGrant(CancelGrantRequest) returns (google.protobuf.Empty);
|
|
13
|
+
rpc FindManyEntitlementGrant(FindManyEntitlementGrantRequest) returns (FindManyEntitlementGrantResponse);
|
|
14
|
+
rpc GetNodeCount(google.protobuf.Empty) returns (GetNodeCountResponse);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message GetBillingStatusResponse {
|
|
18
|
+
int32 totalAllowance = 1;
|
|
19
|
+
int32 used = 2;
|
|
20
|
+
int32 remaining = 3;
|
|
21
|
+
repeated GrantInfo data = 4;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
message GrantInfo {
|
|
25
|
+
string grantId = 1;
|
|
26
|
+
string grantType = 2;
|
|
27
|
+
string status = 3;
|
|
28
|
+
int32 nodeAllowance = 4;
|
|
29
|
+
int32 used = 5;
|
|
30
|
+
string validFrom = 6;
|
|
31
|
+
string validUntil = 7;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message FindManyPlanResponse {
|
|
35
|
+
repeated PlanInfo data = 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message PlanInfo {
|
|
39
|
+
string slug = 1;
|
|
40
|
+
string name = 2;
|
|
41
|
+
int32 includedNodeUnits = 3;
|
|
42
|
+
string billingInterval = 4;
|
|
43
|
+
int32 priceCents = 5;
|
|
44
|
+
string stripePriceId = 6;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message CreateCheckoutSessionRequest {
|
|
48
|
+
string planSlug = 1;
|
|
49
|
+
string successUrl = 2;
|
|
50
|
+
string cancelUrl = 3;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message CreateCheckoutSessionResponse {
|
|
54
|
+
string checkoutUrl = 1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message CancelGrantRequest {
|
|
58
|
+
string grantId = 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
message FindManyEntitlementGrantRequest {
|
|
62
|
+
int32 skip = 1;
|
|
63
|
+
int32 take = 2;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message FindManyEntitlementGrantResponse {
|
|
67
|
+
repeated EntitlementGrantInfo data = 1;
|
|
68
|
+
int32 total = 2;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message EntitlementGrantInfo {
|
|
72
|
+
string grantId = 1;
|
|
73
|
+
string grantType = 2;
|
|
74
|
+
string status = 3;
|
|
75
|
+
int32 nodeAllowance = 4;
|
|
76
|
+
int32 used = 5;
|
|
77
|
+
string validFrom = 6;
|
|
78
|
+
string validUntil = 7;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
message GetNodeCountResponse {
|
|
82
|
+
int32 nodeCount = 1;
|
|
83
83
|
}
|