@control_yourself/contracts 0.0.2 → 0.0.3
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @generated by protoc-gen-es v2.10.2 with parameter "target=ts"
|
|
2
|
-
// @generated from file
|
|
2
|
+
// @generated from file protos/auth.proto (package auth.v1, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
|
|
5
5
|
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
@@ -7,10 +7,10 @@ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2
|
|
|
7
7
|
import type { Message } from "@bufbuild/protobuf";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Describes the file
|
|
10
|
+
* Describes the file protos/auth.proto.
|
|
11
11
|
*/
|
|
12
|
-
export const
|
|
13
|
-
fileDesc("
|
|
12
|
+
export const file_protos_auth: GenFile = /*@__PURE__*/
|
|
13
|
+
fileDesc("ChFwcm90b3MvYXV0aC5wcm90bxIHYXV0aC52MSIrChRWYWxpZGF0ZVRva2VuUmVxdWVzdBITCgthY2Nlc3NUb2tlbhgBIAEoCSI2ChVWYWxpZGF0ZVRva2VuUmVzcG9uc2USDQoFdmFsaWQYASABKAgSDgoGdXNlcklkGAIgASgJMl0KC0F1dGhTZXJ2aWNlEk4KDVZhbGlkYXRlVG9rZW4SHS5hdXRoLnYxLlZhbGlkYXRlVG9rZW5SZXF1ZXN0Gh4uYXV0aC52MS5WYWxpZGF0ZVRva2VuUmVzcG9uc2ViBnByb3RvMw");
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @generated from message auth.v1.ValidateTokenRequest
|
|
@@ -27,7 +27,7 @@ export type ValidateTokenRequest = Message<"auth.v1.ValidateTokenRequest"> & {
|
|
|
27
27
|
* Use `create(ValidateTokenRequestSchema)` to create a new message.
|
|
28
28
|
*/
|
|
29
29
|
export const ValidateTokenRequestSchema: GenMessage<ValidateTokenRequest> = /*@__PURE__*/
|
|
30
|
-
messageDesc(
|
|
30
|
+
messageDesc(file_protos_auth, 0);
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* @generated from message auth.v1.ValidateTokenResponse
|
|
@@ -49,7 +49,7 @@ export type ValidateTokenResponse = Message<"auth.v1.ValidateTokenResponse"> & {
|
|
|
49
49
|
* Use `create(ValidateTokenResponseSchema)` to create a new message.
|
|
50
50
|
*/
|
|
51
51
|
export const ValidateTokenResponseSchema: GenMessage<ValidateTokenResponse> = /*@__PURE__*/
|
|
52
|
-
messageDesc(
|
|
52
|
+
messageDesc(file_protos_auth, 1);
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* @generated from service auth.v1.AuthService
|
|
@@ -64,5 +64,5 @@ export const AuthService: GenService<{
|
|
|
64
64
|
output: typeof ValidateTokenResponseSchema;
|
|
65
65
|
},
|
|
66
66
|
}> = /*@__PURE__*/
|
|
67
|
-
serviceDesc(
|
|
67
|
+
serviceDesc(file_protos_auth, 0);
|
|
68
68
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@control_yourself/contracts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"author": "vladimir.pariy@gmail.com",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"description": "Contracts between microservices",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
|
-
"generated"
|
|
11
|
+
"generated",
|
|
12
|
+
"protos"
|
|
12
13
|
],
|
|
13
14
|
"publishConfig": {
|
|
14
15
|
"access": "public"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package auth.v1;
|
|
4
|
+
|
|
5
|
+
service AuthService {
|
|
6
|
+
rpc ValidateToken (ValidateTokenRequest) returns (ValidateTokenResponse);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
message ValidateTokenRequest {
|
|
10
|
+
string accessToken = 1;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
message ValidateTokenResponse {
|
|
14
|
+
bool valid = 1;
|
|
15
|
+
string userId = 2;
|
|
16
|
+
}
|