@teacinema/contracts 1.1.5 → 1.1.6

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/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.8.3
4
- // protoc v6.33.1
4
+ // protoc v3.21.12
5
5
  // source: account.proto
6
6
 
7
7
  /* eslint-disable */
package/gen/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.8.3
4
- // protoc v6.33.1
4
+ // protoc v3.21.12
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.8.3
4
- // protoc v6.33.1
4
+ // protoc v3.21.12
5
5
  // source: google/protobuf/empty.proto
6
6
 
7
7
  /* eslint-disable */
package/gen/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.8.3
4
- // protoc v6.33.1
4
+ // protoc v3.21.12
5
5
  // source: users.proto
6
6
 
7
7
  /* eslint-disable */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teacinema/contracts",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,69 +1,69 @@
1
- syntax = "proto3";
2
-
3
- package account.v1;
4
-
5
- service AccountService {
6
- rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
7
-
8
- rpc InitEmailChange (InitEmailChangeRequest) returns (InitEmailChangeResponse);
9
- rpc ConfirmEmailChange (ConfirmEmailChangeRequest) returns (ConfirmEmailChangeResponse);
10
-
11
- rpc InitPhoneChange (InitPhoneChangeRequest) returns (InitPhoneChangeResponse);
12
- rpc ConfirmPhoneChange (ConfirmPhoneChangeRequest) returns (ConfirmPhoneChangeResponse);
13
- }
14
-
15
- message GetAccountRequest {
16
- string id = 1;
17
- }
18
-
19
- message GetAccountResponse {
20
- string id = 1;
21
- string phone = 2;
22
- string email = 3;
23
- bool is_phone_verified = 4;
24
- bool is_email_verified = 5;
25
- Role role = 6;
26
- }
27
-
28
- message InitEmailChangeRequest {
29
- string email = 1;
30
- string user_id = 2;
31
- }
32
-
33
- message InitEmailChangeResponse {
34
- bool ok = 1;
35
- }
36
-
37
- message ConfirmEmailChangeRequest {
38
- string email = 1;
39
- string code = 2;
40
- string user_id = 3;
41
- }
42
-
43
- message ConfirmEmailChangeResponse {
44
- bool ok = 1;
45
- }
46
-
47
- message InitPhoneChangeRequest {
48
- string phone = 1;
49
- string user_id = 2;
50
- }
51
-
52
- message InitPhoneChangeResponse {
53
- bool ok = 1;
54
- }
55
-
56
- message ConfirmPhoneChangeRequest {
57
- string phone = 1;
58
- string code = 2;
59
- string user_id = 3;
60
- }
61
-
62
- message ConfirmPhoneChangeResponse {
63
- bool ok = 1;
64
- }
65
-
66
- enum Role {
67
- USER = 0;
68
- ADMIN = 1;
1
+ syntax = "proto3";
2
+
3
+ package account.v1;
4
+
5
+ service AccountService {
6
+ rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
7
+
8
+ rpc InitEmailChange (InitEmailChangeRequest) returns (InitEmailChangeResponse);
9
+ rpc ConfirmEmailChange (ConfirmEmailChangeRequest) returns (ConfirmEmailChangeResponse);
10
+
11
+ rpc InitPhoneChange (InitPhoneChangeRequest) returns (InitPhoneChangeResponse);
12
+ rpc ConfirmPhoneChange (ConfirmPhoneChangeRequest) returns (ConfirmPhoneChangeResponse);
13
+ }
14
+
15
+ message GetAccountRequest {
16
+ string id = 1;
17
+ }
18
+
19
+ message GetAccountResponse {
20
+ string id = 1;
21
+ string phone = 2;
22
+ string email = 3;
23
+ bool is_phone_verified = 4;
24
+ bool is_email_verified = 5;
25
+ Role role = 6;
26
+ }
27
+
28
+ message InitEmailChangeRequest {
29
+ string email = 1;
30
+ string user_id = 2;
31
+ }
32
+
33
+ message InitEmailChangeResponse {
34
+ bool ok = 1;
35
+ }
36
+
37
+ message ConfirmEmailChangeRequest {
38
+ string email = 1;
39
+ string code = 2;
40
+ string user_id = 3;
41
+ }
42
+
43
+ message ConfirmEmailChangeResponse {
44
+ bool ok = 1;
45
+ }
46
+
47
+ message InitPhoneChangeRequest {
48
+ string phone = 1;
49
+ string user_id = 2;
50
+ }
51
+
52
+ message InitPhoneChangeResponse {
53
+ bool ok = 1;
54
+ }
55
+
56
+ message ConfirmPhoneChangeRequest {
57
+ string phone = 1;
58
+ string code = 2;
59
+ string user_id = 3;
60
+ }
61
+
62
+ message ConfirmPhoneChangeResponse {
63
+ bool ok = 1;
64
+ }
65
+
66
+ enum Role {
67
+ USER = 0;
68
+ ADMIN = 1;
69
69
  }
package/proto/auth.proto CHANGED
@@ -1,79 +1,79 @@
1
- syntax = "proto3";
2
-
3
- package auth.v1;
4
-
5
- import "google/protobuf/empty.proto";
6
-
7
- service AuthService {
8
- rpc SendOtp (SendOtpRequest) returns (SendOtpResponse);
9
- rpc VerifyOtp (VerifyOtpRequest) returns (VerifyOtpResponse);
10
- rpc Refresh (RefreshRequest) returns (RefreshResponse);
11
-
12
- rpc TelegramInit (google.protobuf.Empty) returns (TelegramInitResponse);
13
- rpc TelegramVerify (TelegramVerifyRequest) returns (TelegramVerifyResponse);
14
- rpc TelegramComplete (TelegramCompleteRequest) returns (TelegramCompleteResponse);
15
- rpc TelegramConsume (TelegramConsumeRequest) returns (TelegramConsumeResponse);
16
- }
17
-
18
- message SendOtpRequest {
19
- string identifier = 1;
20
- string type = 2;
21
- }
22
-
23
- message SendOtpResponse {
24
- bool ok = 1;
25
- }
26
-
27
- message VerifyOtpRequest {
28
- string identifier = 1;
29
- string type = 2;
30
- string code = 3;
31
- }
32
-
33
- message VerifyOtpResponse {
34
- string access_token = 1;
35
- string refresh_token = 2;
36
- }
37
-
38
- message RefreshRequest {
39
- string refresh_token = 1;
40
- }
41
-
42
- message RefreshResponse {
43
- string access_token = 1;
44
- string refresh_token = 2;
45
- }
46
-
47
- message TelegramInitResponse {
48
- string url = 1;
49
- }
50
-
51
- message TelegramVerifyRequest {
52
- map<string, string> query = 1;
53
- }
54
-
55
- message TelegramVerifyResponse {
56
- oneof result {
57
- string url = 1;
58
- string access_token = 2;
59
- string refresh_token = 3;
60
- }
61
- }
62
-
63
- message TelegramCompleteRequest {
64
- string session_id = 1;
65
- string phone = 2;
66
- }
67
-
68
- message TelegramCompleteResponse {
69
- string session_id = 1;
70
- }
71
-
72
- message TelegramConsumeRequest {
73
- string session_id = 1;
74
- }
75
-
76
- message TelegramConsumeResponse {
77
- string access_token = 1;
78
- string refresh_token = 2;
1
+ syntax = "proto3";
2
+
3
+ package auth.v1;
4
+
5
+ import "google/protobuf/empty.proto";
6
+
7
+ service AuthService {
8
+ rpc SendOtp (SendOtpRequest) returns (SendOtpResponse);
9
+ rpc VerifyOtp (VerifyOtpRequest) returns (VerifyOtpResponse);
10
+ rpc Refresh (RefreshRequest) returns (RefreshResponse);
11
+
12
+ rpc TelegramInit (google.protobuf.Empty) returns (TelegramInitResponse);
13
+ rpc TelegramVerify (TelegramVerifyRequest) returns (TelegramVerifyResponse);
14
+ rpc TelegramComplete (TelegramCompleteRequest) returns (TelegramCompleteResponse);
15
+ rpc TelegramConsume (TelegramConsumeRequest) returns (TelegramConsumeResponse);
16
+ }
17
+
18
+ message SendOtpRequest {
19
+ string identifier = 1;
20
+ string type = 2;
21
+ }
22
+
23
+ message SendOtpResponse {
24
+ bool ok = 1;
25
+ }
26
+
27
+ message VerifyOtpRequest {
28
+ string identifier = 1;
29
+ string type = 2;
30
+ string code = 3;
31
+ }
32
+
33
+ message VerifyOtpResponse {
34
+ string access_token = 1;
35
+ string refresh_token = 2;
36
+ }
37
+
38
+ message RefreshRequest {
39
+ string refresh_token = 1;
40
+ }
41
+
42
+ message RefreshResponse {
43
+ string access_token = 1;
44
+ string refresh_token = 2;
45
+ }
46
+
47
+ message TelegramInitResponse {
48
+ string url = 1;
49
+ }
50
+
51
+ message TelegramVerifyRequest {
52
+ map<string, string> query = 1;
53
+ }
54
+
55
+ message TelegramVerifyResponse {
56
+ oneof result {
57
+ string url = 1;
58
+ string access_token = 2;
59
+ string refresh_token = 3;
60
+ }
61
+ }
62
+
63
+ message TelegramCompleteRequest {
64
+ string session_id = 1;
65
+ string phone = 2;
66
+ }
67
+
68
+ message TelegramCompleteResponse {
69
+ string session_id = 1;
70
+ }
71
+
72
+ message TelegramConsumeRequest {
73
+ string session_id = 1;
74
+ }
75
+
76
+ message TelegramConsumeResponse {
77
+ string access_token = 1;
78
+ string refresh_token = 2;
79
79
  }
package/proto/users.proto CHANGED
@@ -1,44 +1,44 @@
1
- syntax = "proto3";
2
-
3
- package users.v1;
4
-
5
- service UsersService {
6
- rpc GetMe (GetMeRequest) returns (GetMeResponse);
7
-
8
- rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
9
- rpc PatchUser (PatchUserRequest) returns (PatchUserResponse);
10
- }
11
-
12
- message GetMeRequest {
13
- string id = 1;
14
- }
15
-
16
- message GetMeResponse {
17
- User user = 1;
18
- }
19
-
20
- message CreateUserRequest {
21
- string id = 1;
22
- }
23
-
24
- message CreateUserResponse {
25
- bool ok = 1;
26
- }
27
-
28
- message PatchUserRequest {
29
- string user_id = 1;
30
-
31
- optional string name = 2;
32
- }
33
-
34
- message PatchUserResponse {
35
- bool ok = 1;
36
- }
37
-
38
- message User {
39
- string id = 1;
40
- optional string name = 2;
41
- optional string phone = 3;
42
- optional string email = 4;
43
- optional string avatar = 5;
1
+ syntax = "proto3";
2
+
3
+ package users.v1;
4
+
5
+ service UsersService {
6
+ rpc GetMe (GetMeRequest) returns (GetMeResponse);
7
+
8
+ rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
9
+ rpc PatchUser (PatchUserRequest) returns (PatchUserResponse);
10
+ }
11
+
12
+ message GetMeRequest {
13
+ string id = 1;
14
+ }
15
+
16
+ message GetMeResponse {
17
+ User user = 1;
18
+ }
19
+
20
+ message CreateUserRequest {
21
+ string id = 1;
22
+ }
23
+
24
+ message CreateUserResponse {
25
+ bool ok = 1;
26
+ }
27
+
28
+ message PatchUserRequest {
29
+ string user_id = 1;
30
+
31
+ optional string name = 2;
32
+ }
33
+
34
+ message PatchUserResponse {
35
+ bool ok = 1;
36
+ }
37
+
38
+ message User {
39
+ string id = 1;
40
+ optional string name = 2;
41
+ optional string phone = 3;
42
+ optional string email = 4;
43
+ optional string avatar = 5;
44
44
  }