@funpay-pilot/contracts 0.2.4 → 0.3.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/dist/gen/auth.d.ts +7 -0
- package/dist/gen/auth.js +7 -1
- package/gen/auth.ts +8 -0
- package/package.json +1 -1
- package/proto/auth.proto +8 -1
package/dist/gen/auth.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
2
|
export declare const protobufPackage = "auth.v1";
|
|
3
|
+
export declare enum Role {
|
|
4
|
+
USER = "USER",
|
|
5
|
+
ADMIN = "ADMIN",
|
|
6
|
+
UNRECOGNIZED = "UNRECOGNIZED"
|
|
7
|
+
}
|
|
3
8
|
export interface RegisterRequest {
|
|
4
9
|
email: string;
|
|
5
10
|
password: string;
|
|
@@ -30,6 +35,7 @@ export interface ValidateRequest {
|
|
|
30
35
|
export interface ValidateResponse {
|
|
31
36
|
valid: boolean;
|
|
32
37
|
userId: string;
|
|
38
|
+
role: Role;
|
|
33
39
|
}
|
|
34
40
|
export interface GetUserRequest {
|
|
35
41
|
accessToken: string;
|
|
@@ -38,6 +44,7 @@ export interface GetUserResponse {
|
|
|
38
44
|
id: string;
|
|
39
45
|
email: string;
|
|
40
46
|
username: string;
|
|
47
|
+
role: Role;
|
|
41
48
|
createdAt: string;
|
|
42
49
|
}
|
|
43
50
|
export declare const AUTH_V1_PACKAGE_NAME = "auth.v1";
|
package/dist/gen/auth.js
CHANGED
|
@@ -5,11 +5,17 @@
|
|
|
5
5
|
// protoc v7.36.2
|
|
6
6
|
// source: auth.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.AUTH_SERVICE_NAME = exports.AUTH_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
8
|
+
exports.AUTH_SERVICE_NAME = exports.AUTH_V1_PACKAGE_NAME = exports.Role = exports.protobufPackage = void 0;
|
|
9
9
|
exports.AuthServiceControllerMethods = AuthServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const microservices_1 = require("@nestjs/microservices");
|
|
12
12
|
exports.protobufPackage = "auth.v1";
|
|
13
|
+
var Role;
|
|
14
|
+
(function (Role) {
|
|
15
|
+
Role["USER"] = "USER";
|
|
16
|
+
Role["ADMIN"] = "ADMIN";
|
|
17
|
+
Role["UNRECOGNIZED"] = "UNRECOGNIZED";
|
|
18
|
+
})(Role || (exports.Role = Role = {}));
|
|
13
19
|
exports.AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
14
20
|
function AuthServiceControllerMethods() {
|
|
15
21
|
return function (constructor) {
|
package/gen/auth.ts
CHANGED
|
@@ -10,6 +10,12 @@ import { Observable } from "rxjs";
|
|
|
10
10
|
|
|
11
11
|
export const protobufPackage = "auth.v1";
|
|
12
12
|
|
|
13
|
+
export enum Role {
|
|
14
|
+
USER = "USER",
|
|
15
|
+
ADMIN = "ADMIN",
|
|
16
|
+
UNRECOGNIZED = "UNRECOGNIZED",
|
|
17
|
+
}
|
|
18
|
+
|
|
13
19
|
export interface RegisterRequest {
|
|
14
20
|
email: string;
|
|
15
21
|
password: string;
|
|
@@ -47,6 +53,7 @@ export interface ValidateRequest {
|
|
|
47
53
|
export interface ValidateResponse {
|
|
48
54
|
valid: boolean;
|
|
49
55
|
userId: string;
|
|
56
|
+
role: Role;
|
|
50
57
|
}
|
|
51
58
|
|
|
52
59
|
export interface GetUserRequest {
|
|
@@ -57,6 +64,7 @@ export interface GetUserResponse {
|
|
|
57
64
|
id: string;
|
|
58
65
|
email: string;
|
|
59
66
|
username: string;
|
|
67
|
+
role: Role;
|
|
60
68
|
createdAt: string;
|
|
61
69
|
}
|
|
62
70
|
|
package/package.json
CHANGED
package/proto/auth.proto
CHANGED
|
@@ -47,6 +47,7 @@ message ValidateRequest {
|
|
|
47
47
|
message ValidateResponse {
|
|
48
48
|
bool valid = 1;
|
|
49
49
|
string user_id = 2;
|
|
50
|
+
Role role = 3;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
message GetUserRequest {
|
|
@@ -57,5 +58,11 @@ message GetUserResponse {
|
|
|
57
58
|
string id = 1;
|
|
58
59
|
string email = 2;
|
|
59
60
|
string username = 3;
|
|
60
|
-
|
|
61
|
+
Role role = 4;
|
|
62
|
+
string created_at = 5;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
enum Role {
|
|
66
|
+
USER = 0;
|
|
67
|
+
ADMIN = 1;
|
|
61
68
|
}
|