@nemma-training/contracts 1.0.0
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 +20 -0
- package/proto/auth.proto +18 -0
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nemma-training/contracts",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Protobuf contract definitions for Nemma microservices",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"generate": "mkdir -p gen && 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
|
+
"dependencies": {
|
|
13
|
+
"@nestjs/microservices": "^11.1.12",
|
|
14
|
+
"rxjs": "^7.8.2",
|
|
15
|
+
"ts-proto": "^2.11.1"
|
|
16
|
+
},
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/proto/auth.proto
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package auth.v1;
|
|
4
|
+
|
|
5
|
+
service AuthService {
|
|
6
|
+
rpc SendOtp (SendOtpRequest) returns (SendOtpResponse);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
message SendOtpRequest {
|
|
10
|
+
string identifier = 1;
|
|
11
|
+
string type = 2;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message SendOtpResponse {
|
|
15
|
+
bool ok = 1;
|
|
16
|
+
string message = 2;
|
|
17
|
+
}
|
|
18
|
+
|