@noildm/contracts 1.0.0 → 1.0.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/package.json CHANGED
@@ -1,23 +1,23 @@
1
- {
2
- "name": "@noildm/contracts",
3
- "version": "1.0.0",
4
- "description": "Protobuf and RabbitMQ contracts",
5
- "scripts": {
6
- "generate": "npx protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
- },
8
- "files": [
9
- "proto",
10
- "gen"
11
- ],
12
- "publishConfig": {
13
- "access": "public"
14
- },
15
- "dependencies": {
16
- "@bufbuild/buf": "^1.65.0",
17
- "@nestjs/microservices": "^11.1.13",
18
- "rxjs": "^7.8.2"
19
- },
20
- "devDependencies": {
21
- "ts-proto": "^2.11.2"
22
- }
23
- }
1
+ {
2
+ "name": "@noildm/contracts",
3
+ "version": "1.0.1",
4
+ "description": "Protobuf and RabbitMQ contracts",
5
+ "scripts": {
6
+ "generate": "npx protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
+ },
8
+ "files": [
9
+ "proto",
10
+ "gen"
11
+ ],
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "dependencies": {
16
+ "@bufbuild/buf": "^1.65.0",
17
+ "@nestjs/microservices": "^11.1.13",
18
+ "rxjs": "^7.8.2"
19
+ },
20
+ "devDependencies": {
21
+ "ts-proto": "^2.11.2"
22
+ }
23
+ }
package/proto/auth.proto CHANGED
@@ -1,49 +1,49 @@
1
- // Syntax version
2
- syntax = "proto3";
3
-
4
- // package domain.apiVersion
5
- package auth.v1;
6
-
7
- import "google/protobuf/empty.proto";//emty object
8
- import "google/protobuf/timestamp.proto";//unify timestamp object
9
- import "google/protobuf/struct.proto";//JSON
10
- import "google/protobuf/any.proto";//any message
11
- import "google/protobuf/duration.proto";//duration time
12
-
13
- service AuthService {
14
- // rpc Name (Request) returns (Response);
15
- rpc Registration(RegistrationRequest) returns (RegistrationResponse);
16
-
17
- //rpc Ping (google.protobuf.Empty) returns ();
18
- }
19
-
20
- message RegistrationRequest {
21
- string email = 1;
22
- string user_name = 2;
23
- string password = 3;
24
- //bool isVerified = 4; логическое выражение
25
- //int32 age = 5; число
26
- //double rating = 6 плавающая точка
27
- //repeated string roles = 7; массив
28
- //map<string, string> meta = 8; Record
29
- //Status status = 9; Работаю enum
30
- //oneof orientation {
31
- //bool isGay =10;
32
- //bool isHeterosexual = 11;
33
- //} можно выбрать одно значение либо.либо
34
- //google.protobuf.Timestamp created_at = 12;
35
- //google.protobuf.Timestamp updated_at = 13;
36
- }
37
-
38
- // enum Status {
39
- // ACTIVE = 0; //Default value
40
- // BANNED = 1;
41
- // DELETED=2;
42
- // }
43
-
44
-
45
- message RegistrationResponse {
46
- string email = 1;
47
- google.protobuf.Duration expires_time = 2;
48
- string message = 3;
1
+ // Syntax version
2
+ syntax = "proto3";
3
+
4
+ // package domain.apiVersion
5
+ package auth.v1;
6
+
7
+ import "google/protobuf/empty.proto";//emty object
8
+ import "google/protobuf/timestamp.proto";//unify timestamp object
9
+ import "google/protobuf/struct.proto";//JSON
10
+ import "google/protobuf/any.proto";//any message
11
+ import "google/protobuf/duration.proto";//duration time
12
+
13
+ service AuthService {
14
+ // rpc Name (Request) returns (Response);
15
+ rpc Registration(RegistrationRequest) returns (RegistrationResponse);
16
+
17
+ //rpc Ping (google.protobuf.Empty) returns ();
18
+ }
19
+
20
+ message RegistrationRequest {
21
+ string email = 1;
22
+ string user_name = 2;
23
+ string password = 3;
24
+ //bool isVerified = 4; логическое выражение
25
+ //int32 age = 5; число
26
+ //double rating = 6 плавающая точка
27
+ //repeated string roles = 7; массив
28
+ //map<string, string> meta = 8; Record
29
+ //Status status = 9; Работаю enum
30
+ //oneof orientation {
31
+ //bool isGay =10;
32
+ //bool isHeterosexual = 11;
33
+ //} можно выбрать одно значение либо.либо
34
+ //google.protobuf.Timestamp created_at = 12;
35
+ //google.protobuf.Timestamp updated_at = 13;
36
+ }
37
+
38
+ // enum Status {
39
+ // ACTIVE = 0; //Default value
40
+ // BANNED = 1;
41
+ // DELETED=2;
42
+ // }
43
+
44
+
45
+ message RegistrationResponse {
46
+ string email = 1;
47
+ google.protobuf.Duration expires_time = 2;
48
+ string message = 3;
49
49
  }