@thiscargo/contracts 0.0.14 → 0.0.16
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/proto/path.d.ts +2 -0
- package/dist/proto/path.js +2 -0
- package/gen/company.ts +5 -1
- package/gen/server.ts +5 -1
- package/package.json +1 -2
- package/proto/account.proto +1 -0
- package/proto/company.proto +1 -0
- package/proto/server.proto +1 -0
package/dist/proto/path.d.ts
CHANGED
package/dist/proto/path.js
CHANGED
|
@@ -5,4 +5,6 @@ const node_path_1 = require("node:path");
|
|
|
5
5
|
exports.PROTO_PATHS = {
|
|
6
6
|
AUTH: (0, node_path_1.join)(__dirname, "../../proto/auth.proto"),
|
|
7
7
|
ACCOUNT: (0, node_path_1.join)(__dirname, "../../proto/account.proto"),
|
|
8
|
+
SERVER: (0, node_path_1.join)(__dirname, "../../proto/server.proto"),
|
|
9
|
+
COMPANY: (0, node_path_1.join)(__dirname, "../../proto/company.proto"),
|
|
8
10
|
};
|
package/gen/company.ts
CHANGED
|
@@ -57,6 +57,8 @@ export interface CompanyResponse_CompanyCount {
|
|
|
57
57
|
export const COMPANY_V1_PACKAGE_NAME = "company.v1";
|
|
58
58
|
|
|
59
59
|
export interface CompanyServiceClient {
|
|
60
|
+
getAllCompany(request: Empty): Observable<CompanyResponse>;
|
|
61
|
+
|
|
60
62
|
createCompany(request: CreateCompanyRequest): Observable<CompanyResponse>;
|
|
61
63
|
|
|
62
64
|
getCompany(request: GetCompanyRequest): Observable<CompanyResponse>;
|
|
@@ -67,6 +69,8 @@ export interface CompanyServiceClient {
|
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
export interface CompanyServiceController {
|
|
72
|
+
getAllCompany(request: Empty): Observable<CompanyResponse>;
|
|
73
|
+
|
|
70
74
|
createCompany(
|
|
71
75
|
request: CreateCompanyRequest,
|
|
72
76
|
): Promise<CompanyResponse> | Observable<CompanyResponse> | CompanyResponse;
|
|
@@ -82,7 +86,7 @@ export interface CompanyServiceController {
|
|
|
82
86
|
|
|
83
87
|
export function CompanyServiceControllerMethods() {
|
|
84
88
|
return function (constructor: Function) {
|
|
85
|
-
const grpcMethods: string[] = ["createCompany", "getCompany", "updateCompany", "deleteCompany"];
|
|
89
|
+
const grpcMethods: string[] = ["getAllCompany", "createCompany", "getCompany", "updateCompany", "deleteCompany"];
|
|
86
90
|
for (const method of grpcMethods) {
|
|
87
91
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
88
92
|
GrpcMethod("CompanyService", method)(constructor.prototype[method], method, descriptor);
|
package/gen/server.ts
CHANGED
|
@@ -54,6 +54,8 @@ export interface ServerResponse_ServerCount {
|
|
|
54
54
|
export const SERVER_V1_PACKAGE_NAME = "server.v1";
|
|
55
55
|
|
|
56
56
|
export interface ServerServiceClient {
|
|
57
|
+
getAllServer(request: Empty): Observable<ServerResponse>;
|
|
58
|
+
|
|
57
59
|
createServer(request: CreateServerRequest): Observable<ServerResponse>;
|
|
58
60
|
|
|
59
61
|
getServer(request: GetServerRequest): Observable<ServerResponse>;
|
|
@@ -64,6 +66,8 @@ export interface ServerServiceClient {
|
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
export interface ServerServiceController {
|
|
69
|
+
getAllServer(request: Empty): Observable<ServerResponse>;
|
|
70
|
+
|
|
67
71
|
createServer(request: CreateServerRequest): Promise<ServerResponse> | Observable<ServerResponse> | ServerResponse;
|
|
68
72
|
|
|
69
73
|
getServer(request: GetServerRequest): Promise<ServerResponse> | Observable<ServerResponse> | ServerResponse;
|
|
@@ -75,7 +79,7 @@ export interface ServerServiceController {
|
|
|
75
79
|
|
|
76
80
|
export function ServerServiceControllerMethods() {
|
|
77
81
|
return function (constructor: Function) {
|
|
78
|
-
const grpcMethods: string[] = ["createServer", "getServer", "updateServer", "deleteServer"];
|
|
82
|
+
const grpcMethods: string[] = ["getAllServer", "createServer", "getServer", "updateServer", "deleteServer"];
|
|
79
83
|
for (const method of grpcMethods) {
|
|
80
84
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
81
85
|
GrpcMethod("ServerService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thiscargo/contracts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "Protobuf definitions and generated TypeScript types",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@nestjs/microservices": "^11.1.13",
|
|
21
|
-
"@thiscargo/contracts": "^0.0.13",
|
|
22
21
|
"rxjs": "^7.8.2"
|
|
23
22
|
},
|
|
24
23
|
"devDependencies": {
|
package/proto/account.proto
CHANGED
package/proto/company.proto
CHANGED
|
@@ -7,6 +7,7 @@ import "google/protobuf/empty.proto";
|
|
|
7
7
|
import "account.proto";
|
|
8
8
|
|
|
9
9
|
service CompanyService {
|
|
10
|
+
rpc GetAllCompany(google.protobuf.Empty) returns (stream CompanyResponse);
|
|
10
11
|
rpc CreateCompany(CreateCompanyRequest) returns (CompanyResponse);
|
|
11
12
|
rpc GetCompany(GetCompanyRequest) returns (CompanyResponse);
|
|
12
13
|
rpc UpdateCompany(UpdateCompanyRequest) returns (CompanyResponse);
|
package/proto/server.proto
CHANGED
|
@@ -7,6 +7,7 @@ import "google/protobuf/empty.proto";
|
|
|
7
7
|
import "company.proto";
|
|
8
8
|
|
|
9
9
|
service ServerService {
|
|
10
|
+
rpc GetAllServer (google.protobuf.Empty) returns (stream ServerResponse);
|
|
10
11
|
rpc CreateServer (CreateServerRequest) returns (ServerResponse);
|
|
11
12
|
rpc GetServer (GetServerRequest) returns (ServerResponse);
|
|
12
13
|
rpc UpdateServer (UpdateServerRequest) returns (ServerResponse);
|