geniebox-shared-lib 1.0.15 → 1.0.17

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.
@@ -4,13 +4,13 @@ import { Observable } from "rxjs";
4
4
  export declare const protobufPackage = "auth";
5
5
  export interface RegisterCredentials {
6
6
  firstName: string;
7
- lastName: string;
8
- email: string;
9
- phoneNumber: string;
7
+ lastName?: string | undefined;
8
+ email?: string | undefined;
9
+ phoneNumber?: string | undefined;
10
10
  password: string;
11
- photoUrl: string;
12
- birthday: string;
13
- gender: string;
11
+ photoUrl?: string | undefined;
12
+ birthday?: string | undefined;
13
+ gender?: string | undefined;
14
14
  }
15
15
  export interface Tokens {
16
16
  accessToken: string;
@@ -20,7 +20,7 @@ export interface AuthResponse {
20
20
  userId: string;
21
21
  sessionId: string;
22
22
  email: string;
23
- tokens: Tokens | undefined;
23
+ tokens?: Tokens | undefined;
24
24
  }
25
25
  export interface UserResponse {
26
26
  uuid: string;
@@ -38,7 +38,7 @@ export interface RefreshTokenRequest {
38
38
  refreshToken: string;
39
39
  }
40
40
  export interface RefreshTokenResponse {
41
- tokens: Tokens | undefined;
41
+ tokens?: Tokens | undefined;
42
42
  }
43
43
  export declare const AUTH_PACKAGE_NAME = "auth";
44
44
  export declare const RegisterCredentials: MessageFns<RegisterCredentials>;
@@ -13,41 +13,32 @@ const microservices_1 = require("@nestjs/microservices");
13
13
  exports.protobufPackage = "auth";
14
14
  exports.AUTH_PACKAGE_NAME = "auth";
15
15
  function createBaseRegisterCredentials() {
16
- return {
17
- firstName: "",
18
- lastName: "",
19
- email: "",
20
- phoneNumber: "",
21
- password: "",
22
- photoUrl: "",
23
- birthday: "",
24
- gender: "",
25
- };
16
+ return { firstName: "", password: "" };
26
17
  }
27
18
  exports.RegisterCredentials = {
28
19
  encode(message, writer = new wire_1.BinaryWriter()) {
29
20
  if (message.firstName !== "") {
30
21
  writer.uint32(10).string(message.firstName);
31
22
  }
32
- if (message.lastName !== "") {
23
+ if (message.lastName !== undefined) {
33
24
  writer.uint32(18).string(message.lastName);
34
25
  }
35
- if (message.email !== "") {
26
+ if (message.email !== undefined) {
36
27
  writer.uint32(26).string(message.email);
37
28
  }
38
- if (message.phoneNumber !== "") {
29
+ if (message.phoneNumber !== undefined) {
39
30
  writer.uint32(34).string(message.phoneNumber);
40
31
  }
41
32
  if (message.password !== "") {
42
33
  writer.uint32(42).string(message.password);
43
34
  }
44
- if (message.photoUrl !== "") {
35
+ if (message.photoUrl !== undefined) {
45
36
  writer.uint32(50).string(message.photoUrl);
46
37
  }
47
- if (message.birthday !== "") {
38
+ if (message.birthday !== undefined) {
48
39
  writer.uint32(58).string(message.birthday);
49
40
  }
50
- if (message.gender !== "") {
41
+ if (message.gender !== undefined) {
51
42
  writer.uint32(66).string(message.gender);
52
43
  }
53
44
  return writer;
@@ -168,7 +159,7 @@ exports.Tokens = {
168
159
  },
169
160
  };
170
161
  function createBaseAuthResponse() {
171
- return { userId: "", sessionId: "", email: "", tokens: undefined };
162
+ return { userId: "", sessionId: "", email: "" };
172
163
  }
173
164
  exports.AuthResponse = {
174
165
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -387,7 +378,7 @@ exports.RefreshTokenRequest = {
387
378
  },
388
379
  };
389
380
  function createBaseRefreshTokenResponse() {
390
- return { tokens: undefined };
381
+ return {};
391
382
  }
392
383
  exports.RefreshTokenResponse = {
393
384
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -25,8 +25,8 @@ export interface UserAuthentication {
25
25
  }
26
26
  export interface User {
27
27
  uuid: string;
28
- personal: UserPersonal | undefined;
29
- authentication: UserAuthentication | undefined;
28
+ personal?: UserPersonal | undefined;
29
+ authentication?: UserAuthentication | undefined;
30
30
  }
31
31
  export interface CreateUserPersonal {
32
32
  photoUrl: string;
@@ -42,16 +42,16 @@ export interface CreateUserAuthentication {
42
42
  password?: string | undefined;
43
43
  }
44
44
  export interface CreateUserRequest {
45
- personal: CreateUserPersonal | undefined;
46
- authentication: CreateUserAuthentication | undefined;
45
+ personal?: CreateUserPersonal | undefined;
46
+ authentication?: CreateUserAuthentication | undefined;
47
47
  }
48
48
  export interface GetByIdRequest {
49
49
  uuid: string;
50
50
  }
51
51
  export interface UpdateUserRequest {
52
52
  uuid: string;
53
- personal: UserPersonal | undefined;
54
- authentication: UserAuthentication | undefined;
53
+ personal?: UserPersonal | undefined;
54
+ authentication?: UserAuthentication | undefined;
55
55
  }
56
56
  export interface RemoveUserRequest {
57
57
  uuid: string;
@@ -222,7 +222,7 @@ exports.UserAuthentication = {
222
222
  },
223
223
  };
224
224
  function createBaseUser() {
225
- return { uuid: "", personal: undefined, authentication: undefined };
225
+ return { uuid: "" };
226
226
  }
227
227
  exports.User = {
228
228
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -401,7 +401,7 @@ exports.CreateUserAuthentication = {
401
401
  },
402
402
  };
403
403
  function createBaseCreateUserRequest() {
404
- return { personal: undefined, authentication: undefined };
404
+ return {};
405
405
  }
406
406
  exports.CreateUserRequest = {
407
407
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -477,7 +477,7 @@ exports.GetByIdRequest = {
477
477
  },
478
478
  };
479
479
  function createBaseUpdateUserRequest() {
480
- return { uuid: "", personal: undefined, authentication: undefined };
480
+ return { uuid: "" };
481
481
  }
482
482
  exports.UpdateUserRequest = {
483
483
  encode(message, writer = new wire_1.BinaryWriter()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geniebox-shared-lib",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "Shared NestJS library with gRPC clients",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,8 +9,8 @@
9
9
  ],
10
10
  "scripts": {
11
11
  "build": "tsc",
12
- "proto:gen:user": "mkdir -p src/user && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=src/user --ts_proto_opt=nestJs=true,outputServices=grpc-js,returnObservable=false,addGrpcMetadata=true,fileSuffix=.interface,esModuleInterop=true -I=../../libs/protos ../../libs/protos/user.proto",
13
- "proto:gen:auth": "mkdir -p src/auth && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=src/auth --ts_proto_opt=nestJs=true,outputServices=grpc-js,returnObservable=false,addGrpcMetadata=true,fileSuffix=.interface,esModuleInterop=true -I=../../libs/protos ../../libs/protos/auth.proto",
12
+ "proto:gen:user": "mkdir -p src/user && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=src/user --ts_proto_opt=nestJs=true,outputServices=grpc-js,returnObservable=false,addGrpcMetadata=true,fileSuffix=.interface,esModuleInterop=true,useOptionals=true -I=../../libs/protos ../../libs/protos/user.proto",
13
+ "proto:gen:auth": "mkdir -p src/auth && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=src/auth --ts_proto_opt=nestJs=true,outputServices=grpc-js,returnObservable=false,addGrpcMetadata=true,fileSuffix=.interface,esModuleInterop=true,useOptionals=true -I=../../libs/protos ../../libs/protos/auth.proto",
14
14
  "proto:gen": "npm run proto:gen:user && npm run proto:gen:auth",
15
15
  "prepublishOnly": "npm run build"
16
16
  },