geniebox-shared-lib 1.0.19 → 1.0.21

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.
@@ -12,6 +12,11 @@ export interface RegisterCredentials {
12
12
  email?: string | undefined;
13
13
  phoneNumber?: string | undefined;
14
14
  }
15
+ export interface LoginCredentials {
16
+ email?: string | undefined;
17
+ phoneNumber?: string | undefined;
18
+ password: string;
19
+ }
15
20
  export interface Tokens {
16
21
  accessToken: string;
17
22
  refreshToken: string;
@@ -42,6 +47,7 @@ export interface RefreshTokenResponse {
42
47
  }
43
48
  export declare const AUTH_PACKAGE_NAME = "auth";
44
49
  export declare const RegisterCredentials: MessageFns<RegisterCredentials>;
50
+ export declare const LoginCredentials: MessageFns<LoginCredentials>;
45
51
  export declare const Tokens: MessageFns<Tokens>;
46
52
  export declare const AuthResponse: MessageFns<AuthResponse>;
47
53
  export declare const UserResponse: MessageFns<UserResponse>;
@@ -5,7 +5,7 @@
5
5
  // protoc v5.28.2
6
6
  // source: auth.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.AuthServiceService = exports.AUTH_SERVICE_NAME = exports.RefreshTokenResponse = exports.RefreshTokenRequest = exports.UserResponse = exports.AuthResponse = exports.Tokens = exports.RegisterCredentials = exports.AUTH_PACKAGE_NAME = exports.protobufPackage = void 0;
8
+ exports.AuthServiceService = exports.AUTH_SERVICE_NAME = exports.RefreshTokenResponse = exports.RefreshTokenRequest = exports.UserResponse = exports.AuthResponse = exports.Tokens = exports.LoginCredentials = exports.RegisterCredentials = exports.AUTH_PACKAGE_NAME = exports.protobufPackage = void 0;
9
9
  exports.AuthServiceControllerMethods = AuthServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const wire_1 = require("@bufbuild/protobuf/wire");
@@ -115,6 +115,59 @@ exports.RegisterCredentials = {
115
115
  return message;
116
116
  },
117
117
  };
118
+ function createBaseLoginCredentials() {
119
+ return { password: "" };
120
+ }
121
+ exports.LoginCredentials = {
122
+ encode(message, writer = new wire_1.BinaryWriter()) {
123
+ if (message.email !== undefined) {
124
+ writer.uint32(10).string(message.email);
125
+ }
126
+ if (message.phoneNumber !== undefined) {
127
+ writer.uint32(18).string(message.phoneNumber);
128
+ }
129
+ if (message.password !== "") {
130
+ writer.uint32(26).string(message.password);
131
+ }
132
+ return writer;
133
+ },
134
+ decode(input, length) {
135
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
136
+ const end = length === undefined ? reader.len : reader.pos + length;
137
+ const message = createBaseLoginCredentials();
138
+ while (reader.pos < end) {
139
+ const tag = reader.uint32();
140
+ switch (tag >>> 3) {
141
+ case 1: {
142
+ if (tag !== 10) {
143
+ break;
144
+ }
145
+ message.email = reader.string();
146
+ continue;
147
+ }
148
+ case 2: {
149
+ if (tag !== 18) {
150
+ break;
151
+ }
152
+ message.phoneNumber = reader.string();
153
+ continue;
154
+ }
155
+ case 3: {
156
+ if (tag !== 26) {
157
+ break;
158
+ }
159
+ message.password = reader.string();
160
+ continue;
161
+ }
162
+ }
163
+ if ((tag & 7) === 4 || tag === 0) {
164
+ break;
165
+ }
166
+ reader.skip(tag & 7);
167
+ }
168
+ return message;
169
+ },
170
+ };
118
171
  function createBaseTokens() {
119
172
  return { accessToken: "", refreshToken: "" };
120
173
  }
@@ -35,8 +35,8 @@ export interface CreateUserPersonal {
35
35
  birthday?: string | undefined;
36
36
  /** "male" | "female" */
37
37
  gender?: string | undefined;
38
- email: string;
39
- phoneNumber: string;
38
+ email?: string | undefined;
39
+ phoneNumber?: string | undefined;
40
40
  }
41
41
  export interface CreateUserAuthentication {
42
42
  password?: string | undefined;
@@ -275,7 +275,7 @@ exports.User = {
275
275
  },
276
276
  };
277
277
  function createBaseCreateUserPersonal() {
278
- return { firstName: "", email: "", phoneNumber: "" };
278
+ return { firstName: "" };
279
279
  }
280
280
  exports.CreateUserPersonal = {
281
281
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -294,10 +294,10 @@ exports.CreateUserPersonal = {
294
294
  if (message.gender !== undefined) {
295
295
  writer.uint32(42).string(message.gender);
296
296
  }
297
- if (message.email !== "") {
297
+ if (message.email !== undefined) {
298
298
  writer.uint32(50).string(message.email);
299
299
  }
300
- if (message.phoneNumber !== "") {
300
+ if (message.phoneNumber !== undefined) {
301
301
  writer.uint32(58).string(message.phoneNumber);
302
302
  }
303
303
  return writer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geniebox-shared-lib",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "Shared NestJS library with gRPC clients",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",