@sakura-skytree/leaf-eats-contracts 1.1.4 → 1.1.5

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.
@@ -2,4 +2,5 @@ export declare const PROTO_PATHS: {
2
2
  readonly AUTH: string;
3
3
  readonly SESSION: string;
4
4
  readonly PROFILE: string;
5
+ readonly RESTAURANT: string;
5
6
  };
@@ -5,5 +5,6 @@ const path_1 = require("path");
5
5
  exports.PROTO_PATHS = {
6
6
  AUTH: (0, path_1.join)(__dirname, '../../proto/auth.proto'),
7
7
  SESSION: (0, path_1.join)(__dirname, '../../proto/session.proto'),
8
- PROFILE: (0, path_1.join)(__dirname, '../../proto/profile.proto')
8
+ PROFILE: (0, path_1.join)(__dirname, '../../proto/profile.proto'),
9
+ RESTAURANT: (0, path_1.join)(__dirname, '../../proto/restaurant.proto')
9
10
  };
@@ -0,0 +1,50 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.12.0
4
+ // protoc v7.35.1
5
+ // source: restaurant.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 = "restaurant.v1";
13
+
14
+ export interface GetRestaurantsResponse {
15
+ restaurants: Restaurant[];
16
+ }
17
+
18
+ export interface Restaurant {
19
+ id: string;
20
+ name: string;
21
+ }
22
+
23
+ export const RESTAURANT_V1_PACKAGE_NAME = "restaurant.v1";
24
+
25
+ export interface RestaurantServiceClient {
26
+ getRestaurants(request: Empty): Observable<GetRestaurantsResponse>;
27
+ }
28
+
29
+ export interface RestaurantServiceController {
30
+ getRestaurants(
31
+ request: Empty,
32
+ ): Promise<GetRestaurantsResponse> | Observable<GetRestaurantsResponse> | GetRestaurantsResponse;
33
+ }
34
+
35
+ export function RestaurantServiceControllerMethods() {
36
+ return function (constructor: Function) {
37
+ const grpcMethods: string[] = ["getRestaurants"];
38
+ for (const method of grpcMethods) {
39
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
40
+ GrpcMethod("RestaurantService", method)(constructor.prototype[method], method, descriptor);
41
+ }
42
+ const grpcStreamMethods: string[] = [];
43
+ for (const method of grpcStreamMethods) {
44
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
45
+ GrpcStreamMethod("RestaurantService", method)(constructor.prototype[method], method, descriptor);
46
+ }
47
+ };
48
+ }
49
+
50
+ export const RESTAURANT_SERVICE_NAME = "RestaurantService";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sakura-skytree/leaf-eats-contracts",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/",
@@ -0,0 +1,18 @@
1
+ syntax = "proto3";
2
+
3
+ package restaurant.v1;
4
+
5
+ import "google/protobuf/empty.proto";
6
+
7
+ service RestaurantService {
8
+ rpc GetRestaurants(google.protobuf.Empty) returns(GetRestaurantsResponse);
9
+ }
10
+
11
+ message GetRestaurantsResponse {
12
+ repeated Restaurant restaurants = 1;
13
+ }
14
+
15
+ message Restaurant {
16
+ string id = 1;
17
+ string name = 2;
18
+ }