@barumetric/contracts 1.0.10 → 1.1.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 +9 -10
- package/gen/ts/auth.ts +1 -1
- package/gen/ts/google/protobuf/empty.ts +1 -1
- package/package.json +1 -1
- package/proto/account.proto +30 -31
- package/proto/auth.proto +78 -78
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
|
|
4
|
+
// protoc v3.21.12
|
|
5
5
|
// source: account.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
@@ -11,15 +11,14 @@ import { Observable } from "rxjs";
|
|
|
11
11
|
export const protobufPackage = "account.v1";
|
|
12
12
|
|
|
13
13
|
export enum Role {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
SUPERADMIN = 8,
|
|
14
|
+
GUEST = 0,
|
|
15
|
+
USER = 1,
|
|
16
|
+
PREMIUM = 2,
|
|
17
|
+
EDITOR = 3,
|
|
18
|
+
SUPPORT = 4,
|
|
19
|
+
MODERATOR = 5,
|
|
20
|
+
ADMIN = 6,
|
|
21
|
+
SUPERADMIN = 7,
|
|
23
22
|
UNRECOGNIZED = -1,
|
|
24
23
|
}
|
|
25
24
|
|
package/gen/ts/auth.ts
CHANGED
package/package.json
CHANGED
package/proto/account.proto
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package account.v1;
|
|
4
|
-
|
|
5
|
-
service AccountService {
|
|
6
|
-
rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
message GetAccountRequest {
|
|
10
|
-
string id = 1;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
message GetAccountResponse {
|
|
14
|
-
string id = 1;
|
|
15
|
-
string phone = 2;
|
|
16
|
-
string email = 3;
|
|
17
|
-
bool is_phone_verified = 4;
|
|
18
|
-
bool is_email_verified = 5;
|
|
19
|
-
Role role = 6;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
enum Role {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
SUPERADMIN = 8;
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package account.v1;
|
|
4
|
+
|
|
5
|
+
service AccountService {
|
|
6
|
+
rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
message GetAccountRequest {
|
|
10
|
+
string id = 1;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
message GetAccountResponse {
|
|
14
|
+
string id = 1;
|
|
15
|
+
string phone = 2;
|
|
16
|
+
string email = 3;
|
|
17
|
+
bool is_phone_verified = 4;
|
|
18
|
+
bool is_email_verified = 5;
|
|
19
|
+
Role role = 6;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
enum Role {
|
|
23
|
+
GUEST = 0;
|
|
24
|
+
USER = 1;
|
|
25
|
+
PREMIUM = 2;
|
|
26
|
+
EDITOR = 3;
|
|
27
|
+
SUPPORT = 4;
|
|
28
|
+
MODERATOR = 5;
|
|
29
|
+
ADMIN = 6;
|
|
30
|
+
SUPERADMIN = 7;
|
|
32
31
|
}
|
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
|
}
|