@usteam/contracts 1.2.0 → 1.2.3

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.
@@ -5,4 +5,5 @@ export declare const PROTO_PATHS: {
5
5
  readonly MEDIA: string;
6
6
  readonly EVENT: string;
7
7
  readonly CATEGORY: string;
8
+ readonly ARENA: string;
8
9
  };
@@ -9,4 +9,5 @@ exports.PROTO_PATHS = {
9
9
  MEDIA: (0, path_1.join)(__dirname, '../../proto/media.proto'),
10
10
  EVENT: (0, path_1.join)(__dirname, '../../proto/event.proto'),
11
11
  CATEGORY: (0, path_1.join)(__dirname, '../../proto/category.proto'),
12
+ ARENA: (0, path_1.join)(__dirname, '../../proto/arena.proto'),
12
13
  };
package/gen/ts/account.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.10.1
4
- // protoc v6.33.6
4
+ // protoc v4.25.9
5
5
  // source: account.proto
6
6
 
7
7
  /* eslint-disable */
@@ -0,0 +1,90 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.10.1
4
+ // protoc v4.25.9
5
+ // source: arena.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 = "arena.v1";
13
+
14
+ export interface ListArenasResponse {
15
+ arenas: Arena[];
16
+ }
17
+
18
+ export interface GetArenaRequest {
19
+ id: string;
20
+ }
21
+
22
+ export interface GetArenaResponse {
23
+ arena: Arena | undefined;
24
+ }
25
+
26
+ export interface CreateArenaRequest {
27
+ name: string;
28
+ address: string;
29
+ image?: string | undefined;
30
+ }
31
+
32
+ export interface CreateArenaResponse {
33
+ ok: boolean;
34
+ }
35
+
36
+ export interface Arena {
37
+ id: string;
38
+ name: string;
39
+ address: string;
40
+ image?: string | undefined;
41
+ }
42
+
43
+ export const ARENA_V1_PACKAGE_NAME = "arena.v1";
44
+
45
+ export interface ArenaServiceClient {
46
+ /** получение списка арен */
47
+
48
+ listArenas(request: Empty): Observable<ListArenasResponse>;
49
+
50
+ /** получение арены по id */
51
+
52
+ getArena(request: GetArenaRequest): Observable<GetArenaResponse>;
53
+
54
+ /** Создание арены */
55
+
56
+ createArena(request: CreateArenaRequest): Observable<CreateArenaResponse>;
57
+ }
58
+
59
+ export interface ArenaServiceController {
60
+ /** получение списка арен */
61
+
62
+ listArenas(request: Empty): Promise<ListArenasResponse> | Observable<ListArenasResponse> | ListArenasResponse;
63
+
64
+ /** получение арены по id */
65
+
66
+ getArena(request: GetArenaRequest): Promise<GetArenaResponse> | Observable<GetArenaResponse> | GetArenaResponse;
67
+
68
+ /** Создание арены */
69
+
70
+ createArena(
71
+ request: CreateArenaRequest,
72
+ ): Promise<CreateArenaResponse> | Observable<CreateArenaResponse> | CreateArenaResponse;
73
+ }
74
+
75
+ export function ArenaServiceControllerMethods() {
76
+ return function (constructor: Function) {
77
+ const grpcMethods: string[] = ["listArenas", "getArena", "createArena"];
78
+ for (const method of grpcMethods) {
79
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
80
+ GrpcMethod("ArenaService", method)(constructor.prototype[method], method, descriptor);
81
+ }
82
+ const grpcStreamMethods: string[] = [];
83
+ for (const method of grpcStreamMethods) {
84
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
85
+ GrpcStreamMethod("ArenaService", method)(constructor.prototype[method], method, descriptor);
86
+ }
87
+ };
88
+ }
89
+
90
+ export const ARENA_SERVICE_NAME = "ArenaService";
package/gen/ts/auth.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.10.1
4
- // protoc v6.33.6
4
+ // protoc v4.25.9
5
5
  // source: auth.proto
6
6
 
7
7
  /* eslint-disable */
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.10.1
4
- // protoc v6.33.6
4
+ // protoc v4.25.9
5
5
  // source: category.proto
6
6
 
7
7
  /* eslint-disable */
package/gen/ts/event.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.10.1
4
- // protoc v6.33.6
4
+ // protoc v4.25.9
5
5
  // source: event.proto
6
6
 
7
7
  /* eslint-disable */
@@ -35,7 +35,7 @@ export interface Event {
35
35
  title: string;
36
36
  slug: string;
37
37
  poster: string;
38
- ratingAge: string;
38
+ ratingAge: number;
39
39
  releaseDate: Timestamp | undefined;
40
40
  }
41
41
 
@@ -47,7 +47,7 @@ export interface EventDetails {
47
47
  poster: string;
48
48
  banner: string;
49
49
  duration: number;
50
- ratingAge: string;
50
+ ratingAge: number;
51
51
  place: string;
52
52
  releaseDate: Timestamp | undefined;
53
53
  }
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.10.1
4
- // protoc v6.33.6
4
+ // protoc v4.25.9
5
5
  // source: google/protobuf/empty.proto
6
6
 
7
7
  /* eslint-disable */
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.10.1
4
- // protoc v6.33.6
4
+ // protoc v4.25.9
5
5
  // source: google/protobuf/timestamp.proto
6
6
 
7
7
  /* eslint-disable */
@@ -101,16 +101,15 @@ export const protobufPackage = "google.protobuf";
101
101
  */
102
102
  export interface Timestamp {
103
103
  /**
104
- * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
105
- * be between -315576000000 and 315576000000 inclusive (which corresponds to
106
- * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
104
+ * Represents seconds of UTC time since Unix epoch
105
+ * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
106
+ * 9999-12-31T23:59:59Z inclusive.
107
107
  */
108
108
  seconds: number;
109
109
  /**
110
- * Non-negative fractions of a second at nanosecond resolution. This field is
111
- * the nanosecond portion of the duration, not an alternative to seconds.
112
- * Negative second values with fractions must still have non-negative nanos
113
- * values that count forward in time. Must be between 0 and 999,999,999
110
+ * Non-negative fractions of a second at nanosecond resolution. Negative
111
+ * second values with fractions must still have non-negative nanos values
112
+ * that count forward in time. Must be from 0 to 999,999,999
114
113
  * inclusive.
115
114
  */
116
115
  nanos: number;
package/gen/ts/media.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.10.1
4
- // protoc v6.33.6
4
+ // protoc v4.25.9
5
5
  // source: media.proto
6
6
 
7
7
  /* eslint-disable */
package/gen/ts/users.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.10.1
4
- // protoc v6.33.6
4
+ // protoc v4.25.9
5
5
  // source: users.proto
6
6
 
7
7
  /* eslint-disable */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usteam/contracts",
3
- "version": "1.2.0",
3
+ "version": "1.2.3",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "scripts": {
@@ -0,0 +1,45 @@
1
+ syntax = "proto3";
2
+
3
+ package arena.v1;
4
+
5
+ import "google/protobuf/empty.proto";
6
+
7
+ service ArenaService {
8
+ //получение списка арен
9
+ rpc ListArenas (google.protobuf.Empty) returns (ListArenasResponse);
10
+ //получение арены по id
11
+ rpc GetArena (GetArenaRequest) returns (GetArenaResponse);
12
+ // Создание арены
13
+ rpc CreateArena (CreateArenaRequest) returns (CreateArenaResponse);
14
+
15
+ }
16
+
17
+ message ListArenasResponse {
18
+ repeated Arena arenas = 1;
19
+ }
20
+
21
+ message GetArenaRequest {
22
+ string id = 1;
23
+ }
24
+
25
+ message GetArenaResponse {
26
+ Arena arena = 1;
27
+ }
28
+
29
+ message CreateArenaRequest {
30
+ string name = 1;
31
+ string address = 2;
32
+ optional string image = 3;
33
+
34
+ }
35
+
36
+ message CreateArenaResponse {
37
+ bool ok = 1;
38
+ }
39
+
40
+ message Arena {
41
+ string id = 1;
42
+ string name = 2;
43
+ string address = 3;
44
+ optional string image = 4;
45
+ }
package/proto/event.proto CHANGED
@@ -39,7 +39,7 @@ message Event {
39
39
  string title = 2;
40
40
  string slug = 3;
41
41
  string poster = 4;
42
- string rating_age = 5;
42
+ int32 rating_age = 5;
43
43
  google.protobuf.Timestamp release_date = 6;
44
44
  }
45
45
 
@@ -51,7 +51,7 @@ message EventDetails {
51
51
  string poster = 5;
52
52
  string banner = 6;
53
53
  int32 duration = 7;
54
- string rating_age = 8;
54
+ int32 rating_age = 8;
55
55
  string place = 9;
56
56
  google.protobuf.Timestamp release_date = 10;
57
57
  }