@trash-streamers/contracts 1.1.8 → 1.1.10

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,9 +1,9 @@
1
1
  import { Observable } from "rxjs";
2
2
  export declare const protobufPackage = "account.v1";
3
3
  export declare enum Role {
4
- USER = 0,
5
- ADMIN = 1,
6
- UNRECOGNIZED = -1
4
+ USER = "USER",
5
+ ADMIN = "ADMIN",
6
+ UNRECOGNIZED = "UNRECOGNIZED"
7
7
  }
8
8
  export interface GetAccountRequest {
9
9
  id: string;
@@ -12,9 +12,9 @@ const microservices_1 = require("@nestjs/microservices");
12
12
  exports.protobufPackage = "account.v1";
13
13
  var Role;
14
14
  (function (Role) {
15
- Role[Role["USER"] = 0] = "USER";
16
- Role[Role["ADMIN"] = 1] = "ADMIN";
17
- Role[Role["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
15
+ Role["USER"] = "USER";
16
+ Role["ADMIN"] = "ADMIN";
17
+ Role["UNRECOGNIZED"] = "UNRECOGNIZED";
18
18
  })(Role || (exports.Role = Role = {}));
19
19
  exports.ACCOUNT_V1_PACKAGE_NAME = "account.v1";
20
20
  function AccountServiceControllerMethods() {
@@ -1,9 +1,9 @@
1
1
  import { Observable } from "rxjs";
2
2
  export declare const protobufPackage = "auth.v1";
3
3
  export declare enum AuthType {
4
- PHONE = 0,
5
- EMAIL = 1,
6
- UNRECOGNIZED = -1
4
+ PHONE = "PHONE",
5
+ EMAIL = "EMAIL",
6
+ UNRECOGNIZED = "UNRECOGNIZED"
7
7
  }
8
8
  export interface SendOtpRequest {
9
9
  identifier: string;
@@ -12,9 +12,9 @@ const microservices_1 = require("@nestjs/microservices");
12
12
  exports.protobufPackage = "auth.v1";
13
13
  var AuthType;
14
14
  (function (AuthType) {
15
- AuthType[AuthType["PHONE"] = 0] = "PHONE";
16
- AuthType[AuthType["EMAIL"] = 1] = "EMAIL";
17
- AuthType[AuthType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
15
+ AuthType["PHONE"] = "PHONE";
16
+ AuthType["EMAIL"] = "EMAIL";
17
+ AuthType["UNRECOGNIZED"] = "UNRECOGNIZED";
18
18
  })(AuthType || (exports.AuthType = AuthType = {}));
19
19
  exports.AUTH_V1_PACKAGE_NAME = "auth.v1";
20
20
  function AuthServiceControllerMethods() {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@trash-streamers/contracts",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "scripts": {
7
7
  "build": "tsc -p tsconfig.build.json",
8
- "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./src/gen/ts --ts_proto_opt=nestJs=true,package=omit,useEnumValuesAsString=true"
8
+ "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./src/gen/ts --ts_proto_opt=nestJs=true,package=omit,stringEnums=true"
9
9
  },
10
10
  "files": [
11
11
  "dist",
@@ -17,12 +17,7 @@ message GetAccountRequest {
17
17
  }
18
18
 
19
19
  message GetAccountResponse {
20
- string id = 1;
21
- string phone = 2;
22
- string email = 3;
23
- bool is_phone_verified = 4;
24
- bool is_email_verified = 5;
25
- Role role = 6;
20
+ Account account = 1;
26
21
  }
27
22
 
28
23
  message InitEmailChangeRequest {
@@ -66,4 +61,14 @@ message ConfirmPhoneChangeResponse {
66
61
  enum Role {
67
62
  USER = 0;
68
63
  ADMIN = 1;
64
+ }
65
+
66
+ message Account {
67
+ string id = 1;
68
+ string phone = 2;
69
+ string email = 3;
70
+ bool is_phone_verified = 4;
71
+ bool is_email_verified = 5;
72
+ Role role = 6;
73
+
69
74
  }
package/proto/users.proto CHANGED
@@ -39,7 +39,5 @@ message PatchUserResponse {
39
39
  message User {
40
40
  string id = 1;
41
41
  optional string name = 2;
42
- optional string phone = 3;
43
- optional string email = 4;
44
- optional string avatar = 5;
42
+ optional string avatar = 3;
45
43
  }