@thiscargo/contracts 0.0.20 → 0.0.21
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/gen/company.ts +18 -1
- package/package.json +1 -1
- package/proto/company.proto +5 -0
package/gen/company.ts
CHANGED
|
@@ -13,6 +13,10 @@ import { Timestamp } from "./google/protobuf/timestamp";
|
|
|
13
13
|
|
|
14
14
|
export const protobufPackage = "company.v1";
|
|
15
15
|
|
|
16
|
+
export interface RestoreCompanyRequest {
|
|
17
|
+
id: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
export interface CreateCompanyRequest {
|
|
17
21
|
serverId: string;
|
|
18
22
|
name: string;
|
|
@@ -75,6 +79,8 @@ export interface CompanyServiceClient {
|
|
|
75
79
|
updateCompany(request: UpdateCompanyRequest): Observable<CompanyResponse>;
|
|
76
80
|
|
|
77
81
|
deleteCompany(request: DeleteCompanyRequest): Observable<Empty>;
|
|
82
|
+
|
|
83
|
+
restoreCompany(request: RestoreCompanyRequest): Observable<CompanyResponse>;
|
|
78
84
|
}
|
|
79
85
|
|
|
80
86
|
export interface CompanyServiceController {
|
|
@@ -91,11 +97,22 @@ export interface CompanyServiceController {
|
|
|
91
97
|
): Promise<CompanyResponse> | Observable<CompanyResponse> | CompanyResponse;
|
|
92
98
|
|
|
93
99
|
deleteCompany(request: DeleteCompanyRequest): void | Promise<void>;
|
|
100
|
+
|
|
101
|
+
restoreCompany(
|
|
102
|
+
request: RestoreCompanyRequest,
|
|
103
|
+
): Promise<CompanyResponse> | Observable<CompanyResponse> | CompanyResponse;
|
|
94
104
|
}
|
|
95
105
|
|
|
96
106
|
export function CompanyServiceControllerMethods() {
|
|
97
107
|
return function (constructor: Function) {
|
|
98
|
-
const grpcMethods: string[] = [
|
|
108
|
+
const grpcMethods: string[] = [
|
|
109
|
+
"getAllCompany",
|
|
110
|
+
"createCompany",
|
|
111
|
+
"getCompany",
|
|
112
|
+
"updateCompany",
|
|
113
|
+
"deleteCompany",
|
|
114
|
+
"restoreCompany",
|
|
115
|
+
];
|
|
99
116
|
for (const method of grpcMethods) {
|
|
100
117
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
101
118
|
GrpcMethod("CompanyService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/company.proto
CHANGED
|
@@ -12,6 +12,11 @@ service CompanyService {
|
|
|
12
12
|
rpc GetCompany(GetCompanyRequest) returns (CompanyResponse);
|
|
13
13
|
rpc UpdateCompany(UpdateCompanyRequest) returns (CompanyResponse);
|
|
14
14
|
rpc DeleteCompany(DeleteCompanyRequest) returns (google.protobuf.Empty);
|
|
15
|
+
rpc RestoreCompany(RestoreCompanyRequest) returns (CompanyResponse);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message RestoreCompanyRequest {
|
|
19
|
+
string id = 1;
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
message CreateCompanyRequest {
|