@airticketss/contracts 1.2.0 → 1.2.1
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/ts/account.ts +1 -1
- package/gen/ts/airline.ts +1 -1
- package/gen/ts/airport.ts +80 -0
- package/gen/ts/auth.ts +1 -1
- package/gen/ts/flight.ts +1 -1
- package/gen/ts/google/protobuf/empty.ts +1 -1
- package/gen/ts/google/protobuf/timestamp.ts +1 -1
- package/gen/ts/media.ts +1 -1
- package/gen/ts/users.ts +1 -1
- package/package.json +1 -1
- package/proto/airport.proto +39 -0
package/gen/ts/account.ts
CHANGED
package/gen/ts/airline.ts
CHANGED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.12.4
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: airport.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
import { Empty } from "./google/protobuf/empty";
|
|
11
|
+
|
|
12
|
+
export const protobufPackage = "airport.v1";
|
|
13
|
+
|
|
14
|
+
export interface ListAirportsResponse {
|
|
15
|
+
airports: Airport[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface GetAirportRequest {
|
|
19
|
+
id: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface GetAirportResponse {
|
|
23
|
+
airport: Airport | undefined;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface CreateAirportRequest {
|
|
27
|
+
name: string;
|
|
28
|
+
iataCode: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface CreateAirportResponse {
|
|
32
|
+
ok: boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface Airport {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
iataCode: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const AIRPORT_V1_PACKAGE_NAME = "airport.v1";
|
|
42
|
+
|
|
43
|
+
export interface AirportServiceClient {
|
|
44
|
+
listAirports(request: Empty): Observable<ListAirportsResponse>;
|
|
45
|
+
|
|
46
|
+
getAirport(request: GetAirportRequest): Observable<GetAirportResponse>;
|
|
47
|
+
|
|
48
|
+
createAirport(request: CreateAirportRequest): Observable<CreateAirportResponse>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface AirportServiceController {
|
|
52
|
+
listAirports(request: Empty): Promise<ListAirportsResponse> | Observable<ListAirportsResponse> | ListAirportsResponse;
|
|
53
|
+
|
|
54
|
+
getAirport(
|
|
55
|
+
request: GetAirportRequest,
|
|
56
|
+
): Promise<GetAirportResponse> | Observable<GetAirportResponse> | GetAirportResponse;
|
|
57
|
+
|
|
58
|
+
createAirport(
|
|
59
|
+
request: CreateAirportRequest,
|
|
60
|
+
): Promise<CreateAirportResponse> | Observable<CreateAirportResponse> | CreateAirportResponse;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function AirportServiceControllerMethods() {
|
|
64
|
+
return function (constructor: Function) {
|
|
65
|
+
const grpcMethods: string[] = ["listAirports", "getAirport", "createAirport"];
|
|
66
|
+
for (const method of grpcMethods) {
|
|
67
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
68
|
+
GrpcMethod("AirportService", method)(constructor.prototype[method], method, descriptor);
|
|
69
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
70
|
+
}
|
|
71
|
+
const grpcStreamMethods: string[] = [];
|
|
72
|
+
for (const method of grpcStreamMethods) {
|
|
73
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
74
|
+
GrpcStreamMethod("AirportService", method)(constructor.prototype[method], method, descriptor);
|
|
75
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export const AIRPORT_SERVICE_NAME = "AirportService";
|
package/gen/ts/auth.ts
CHANGED
package/gen/ts/flight.ts
CHANGED
package/gen/ts/media.ts
CHANGED
package/gen/ts/users.ts
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package airport.v1;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/empty.proto";
|
|
6
|
+
|
|
7
|
+
service AirportService {
|
|
8
|
+
rpc ListAirports (google.protobuf.Empty) returns (ListAirportsResponse);
|
|
9
|
+
rpc GetAirport (GetAirportRequest) returns (GetAirportResponse);
|
|
10
|
+
|
|
11
|
+
rpc CreateAirport (CreateAirportRequest) returns (CreateAirportResponse);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message ListAirportsResponse {
|
|
15
|
+
repeated Airport airports = 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message GetAirportRequest {
|
|
19
|
+
string id = 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message GetAirportResponse {
|
|
23
|
+
Airport airport = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message CreateAirportRequest {
|
|
27
|
+
string name = 1;
|
|
28
|
+
string iata_code = 2;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message CreateAirportResponse {
|
|
32
|
+
bool ok = 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message Airport {
|
|
36
|
+
string id = 1;
|
|
37
|
+
string name = 2;
|
|
38
|
+
string iata_code = 3;
|
|
39
|
+
}
|