@platfformx/proto-contracts 1.0.1 → 1.0.2
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 +5 -2
- package/proto/auth-service/auth.proto +13 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platfformx/proto-contracts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -21,5 +21,8 @@
|
|
|
21
21
|
"ts-proto": "^2.11.8",
|
|
22
22
|
"typescript": "^6.0.3"
|
|
23
23
|
},
|
|
24
|
-
"dependencies": {
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@nestjs/microservices": "^11.1.21",
|
|
26
|
+
"rxjs": "^7.8.2"
|
|
27
|
+
}
|
|
25
28
|
}
|
|
@@ -3,25 +3,28 @@ syntax = "proto3";
|
|
|
3
3
|
package auth_service.v1;
|
|
4
4
|
|
|
5
5
|
service AuthService {
|
|
6
|
-
rpc
|
|
6
|
+
rpc CreateAccount (CreateAccountRequest) returns (CreateAccountResponse);
|
|
7
7
|
rpc Authenticate (AuthenticationRequest) returns (AuthenticationResponse);
|
|
8
8
|
rpc RefreshTokens (TokenRefreshRequest) returns (TokenRefreshResponse);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
message CreateAccountRequest {
|
|
12
13
|
oneof register_method {
|
|
13
|
-
|
|
14
|
+
UserCredentials credentials = 1;
|
|
14
15
|
string oauth_token = 2;
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
message
|
|
19
|
+
message CreateAccountResponse {
|
|
19
20
|
string user_id = 1;
|
|
21
|
+
string access_token = 2;
|
|
22
|
+
string refresh_token = 3;
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
message AuthenticationRequest {
|
|
23
26
|
oneof auth_method {
|
|
24
|
-
|
|
27
|
+
UserCredentials credentials = 1;
|
|
25
28
|
string oauth_token = 2;
|
|
26
29
|
}
|
|
27
30
|
}
|
|
@@ -32,23 +35,15 @@ message AuthenticationResponse {
|
|
|
32
35
|
UserInfo user = 3;
|
|
33
36
|
}
|
|
34
37
|
|
|
35
|
-
message RegisterCredentials {
|
|
36
|
-
oneof identifier {
|
|
37
|
-
string email = 1;
|
|
38
|
-
string phone = 2;
|
|
39
|
-
}
|
|
40
|
-
string password = 3;
|
|
41
|
-
}
|
|
42
38
|
|
|
43
|
-
message
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
string username = 3;
|
|
48
|
-
}
|
|
39
|
+
message UserCredentials {
|
|
40
|
+
string email = 1;
|
|
41
|
+
string phone = 2;
|
|
42
|
+
string username = 3;
|
|
49
43
|
string password = 4;
|
|
50
44
|
}
|
|
51
45
|
|
|
46
|
+
//Токены
|
|
52
47
|
message TokenRefreshRequest {
|
|
53
48
|
string refresh_token = 1;
|
|
54
49
|
}
|