geniebox-shared-lib 1.0.9 → 1.0.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.
- package/dist/user/user.interface.d.ts +21 -3
- package/dist/user/user.interface.js +163 -7
- package/package.json +1 -1
|
@@ -18,16 +18,32 @@ export interface UserPersonal {
|
|
|
18
18
|
updatedAt: string;
|
|
19
19
|
}
|
|
20
20
|
export interface UserAuthentication {
|
|
21
|
-
|
|
21
|
+
uuid: string;
|
|
22
|
+
userId: string;
|
|
23
|
+
password?: string | undefined;
|
|
24
|
+
passwordHash: string;
|
|
22
25
|
}
|
|
23
26
|
export interface User {
|
|
24
27
|
uuid: string;
|
|
25
28
|
personal: UserPersonal | undefined;
|
|
26
29
|
authentication: UserAuthentication | undefined;
|
|
27
30
|
}
|
|
31
|
+
export interface CreateUserPersonal {
|
|
32
|
+
photoUrl: string;
|
|
33
|
+
firstName: string;
|
|
34
|
+
lastName: string;
|
|
35
|
+
birthday: string;
|
|
36
|
+
/** "male" | "female" */
|
|
37
|
+
gender: string;
|
|
38
|
+
email: string;
|
|
39
|
+
phoneNumber: string;
|
|
40
|
+
}
|
|
41
|
+
export interface CreateUserAuthentication {
|
|
42
|
+
password?: string | undefined;
|
|
43
|
+
}
|
|
28
44
|
export interface CreateUserRequest {
|
|
29
|
-
personal:
|
|
30
|
-
authentication:
|
|
45
|
+
personal: CreateUserPersonal | undefined;
|
|
46
|
+
authentication: CreateUserAuthentication | undefined;
|
|
31
47
|
}
|
|
32
48
|
export interface GetByIdRequest {
|
|
33
49
|
uuid: string;
|
|
@@ -59,6 +75,8 @@ export declare const USER_PACKAGE_NAME = "user";
|
|
|
59
75
|
export declare const UserPersonal: MessageFns<UserPersonal>;
|
|
60
76
|
export declare const UserAuthentication: MessageFns<UserAuthentication>;
|
|
61
77
|
export declare const User: MessageFns<User>;
|
|
78
|
+
export declare const CreateUserPersonal: MessageFns<CreateUserPersonal>;
|
|
79
|
+
export declare const CreateUserAuthentication: MessageFns<CreateUserAuthentication>;
|
|
62
80
|
export declare const CreateUserRequest: MessageFns<CreateUserRequest>;
|
|
63
81
|
export declare const GetByIdRequest: MessageFns<GetByIdRequest>;
|
|
64
82
|
export declare const UpdateUserRequest: MessageFns<UpdateUserRequest>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v5.28.2
|
|
6
6
|
// source: user.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.UserServiceService = exports.USER_SERVICE_NAME = exports.UsersResponse = exports.UserResponse = exports.RemoveUserRequest = exports.UpdateUserRequest = exports.GetByIdRequest = exports.CreateUserRequest = exports.User = exports.UserAuthentication = exports.UserPersonal = exports.USER_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
8
|
+
exports.UserServiceService = exports.USER_SERVICE_NAME = exports.UsersResponse = exports.UserResponse = exports.RemoveUserRequest = exports.UpdateUserRequest = exports.GetByIdRequest = exports.CreateUserRequest = exports.CreateUserAuthentication = exports.CreateUserPersonal = exports.User = exports.UserAuthentication = exports.UserPersonal = exports.USER_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
9
|
exports.UserServiceControllerMethods = UserServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
@@ -159,13 +159,22 @@ exports.UserPersonal = {
|
|
|
159
159
|
},
|
|
160
160
|
};
|
|
161
161
|
function createBaseUserAuthentication() {
|
|
162
|
-
return {
|
|
162
|
+
return { uuid: "", userId: "", passwordHash: "" };
|
|
163
163
|
}
|
|
164
164
|
exports.UserAuthentication = {
|
|
165
165
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
166
|
-
if (message.
|
|
166
|
+
if (message.uuid !== "") {
|
|
167
|
+
writer.uint32(10).string(message.uuid);
|
|
168
|
+
}
|
|
169
|
+
if (message.userId !== "") {
|
|
170
|
+
writer.uint32(18).string(message.userId);
|
|
171
|
+
}
|
|
172
|
+
if (message.password !== undefined) {
|
|
167
173
|
writer.uint32(26).string(message.password);
|
|
168
174
|
}
|
|
175
|
+
if (message.passwordHash !== "") {
|
|
176
|
+
writer.uint32(34).string(message.passwordHash);
|
|
177
|
+
}
|
|
169
178
|
return writer;
|
|
170
179
|
},
|
|
171
180
|
decode(input, length) {
|
|
@@ -175,6 +184,20 @@ exports.UserAuthentication = {
|
|
|
175
184
|
while (reader.pos < end) {
|
|
176
185
|
const tag = reader.uint32();
|
|
177
186
|
switch (tag >>> 3) {
|
|
187
|
+
case 1: {
|
|
188
|
+
if (tag !== 10) {
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
message.uuid = reader.string();
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
case 2: {
|
|
195
|
+
if (tag !== 18) {
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
message.userId = reader.string();
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
178
201
|
case 3: {
|
|
179
202
|
if (tag !== 26) {
|
|
180
203
|
break;
|
|
@@ -182,6 +205,13 @@ exports.UserAuthentication = {
|
|
|
182
205
|
message.password = reader.string();
|
|
183
206
|
continue;
|
|
184
207
|
}
|
|
208
|
+
case 4: {
|
|
209
|
+
if (tag !== 34) {
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
message.passwordHash = reader.string();
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
185
215
|
}
|
|
186
216
|
if ((tag & 7) === 4 || tag === 0) {
|
|
187
217
|
break;
|
|
@@ -244,16 +274,142 @@ exports.User = {
|
|
|
244
274
|
return message;
|
|
245
275
|
},
|
|
246
276
|
};
|
|
277
|
+
function createBaseCreateUserPersonal() {
|
|
278
|
+
return { photoUrl: "", firstName: "", lastName: "", birthday: "", gender: "", email: "", phoneNumber: "" };
|
|
279
|
+
}
|
|
280
|
+
exports.CreateUserPersonal = {
|
|
281
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
282
|
+
if (message.photoUrl !== "") {
|
|
283
|
+
writer.uint32(10).string(message.photoUrl);
|
|
284
|
+
}
|
|
285
|
+
if (message.firstName !== "") {
|
|
286
|
+
writer.uint32(18).string(message.firstName);
|
|
287
|
+
}
|
|
288
|
+
if (message.lastName !== "") {
|
|
289
|
+
writer.uint32(26).string(message.lastName);
|
|
290
|
+
}
|
|
291
|
+
if (message.birthday !== "") {
|
|
292
|
+
writer.uint32(34).string(message.birthday);
|
|
293
|
+
}
|
|
294
|
+
if (message.gender !== "") {
|
|
295
|
+
writer.uint32(42).string(message.gender);
|
|
296
|
+
}
|
|
297
|
+
if (message.email !== "") {
|
|
298
|
+
writer.uint32(50).string(message.email);
|
|
299
|
+
}
|
|
300
|
+
if (message.phoneNumber !== "") {
|
|
301
|
+
writer.uint32(58).string(message.phoneNumber);
|
|
302
|
+
}
|
|
303
|
+
return writer;
|
|
304
|
+
},
|
|
305
|
+
decode(input, length) {
|
|
306
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
307
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
308
|
+
const message = createBaseCreateUserPersonal();
|
|
309
|
+
while (reader.pos < end) {
|
|
310
|
+
const tag = reader.uint32();
|
|
311
|
+
switch (tag >>> 3) {
|
|
312
|
+
case 1: {
|
|
313
|
+
if (tag !== 10) {
|
|
314
|
+
break;
|
|
315
|
+
}
|
|
316
|
+
message.photoUrl = reader.string();
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
319
|
+
case 2: {
|
|
320
|
+
if (tag !== 18) {
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
message.firstName = reader.string();
|
|
324
|
+
continue;
|
|
325
|
+
}
|
|
326
|
+
case 3: {
|
|
327
|
+
if (tag !== 26) {
|
|
328
|
+
break;
|
|
329
|
+
}
|
|
330
|
+
message.lastName = reader.string();
|
|
331
|
+
continue;
|
|
332
|
+
}
|
|
333
|
+
case 4: {
|
|
334
|
+
if (tag !== 34) {
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
message.birthday = reader.string();
|
|
338
|
+
continue;
|
|
339
|
+
}
|
|
340
|
+
case 5: {
|
|
341
|
+
if (tag !== 42) {
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
message.gender = reader.string();
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
case 6: {
|
|
348
|
+
if (tag !== 50) {
|
|
349
|
+
break;
|
|
350
|
+
}
|
|
351
|
+
message.email = reader.string();
|
|
352
|
+
continue;
|
|
353
|
+
}
|
|
354
|
+
case 7: {
|
|
355
|
+
if (tag !== 58) {
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
|
+
message.phoneNumber = reader.string();
|
|
359
|
+
continue;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
reader.skip(tag & 7);
|
|
366
|
+
}
|
|
367
|
+
return message;
|
|
368
|
+
},
|
|
369
|
+
};
|
|
370
|
+
function createBaseCreateUserAuthentication() {
|
|
371
|
+
return {};
|
|
372
|
+
}
|
|
373
|
+
exports.CreateUserAuthentication = {
|
|
374
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
375
|
+
if (message.password !== undefined) {
|
|
376
|
+
writer.uint32(10).string(message.password);
|
|
377
|
+
}
|
|
378
|
+
return writer;
|
|
379
|
+
},
|
|
380
|
+
decode(input, length) {
|
|
381
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
382
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
383
|
+
const message = createBaseCreateUserAuthentication();
|
|
384
|
+
while (reader.pos < end) {
|
|
385
|
+
const tag = reader.uint32();
|
|
386
|
+
switch (tag >>> 3) {
|
|
387
|
+
case 1: {
|
|
388
|
+
if (tag !== 10) {
|
|
389
|
+
break;
|
|
390
|
+
}
|
|
391
|
+
message.password = reader.string();
|
|
392
|
+
continue;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
396
|
+
break;
|
|
397
|
+
}
|
|
398
|
+
reader.skip(tag & 7);
|
|
399
|
+
}
|
|
400
|
+
return message;
|
|
401
|
+
},
|
|
402
|
+
};
|
|
247
403
|
function createBaseCreateUserRequest() {
|
|
248
404
|
return { personal: undefined, authentication: undefined };
|
|
249
405
|
}
|
|
250
406
|
exports.CreateUserRequest = {
|
|
251
407
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
252
408
|
if (message.personal !== undefined) {
|
|
253
|
-
exports.
|
|
409
|
+
exports.CreateUserPersonal.encode(message.personal, writer.uint32(10).fork()).join();
|
|
254
410
|
}
|
|
255
411
|
if (message.authentication !== undefined) {
|
|
256
|
-
exports.
|
|
412
|
+
exports.CreateUserAuthentication.encode(message.authentication, writer.uint32(18).fork()).join();
|
|
257
413
|
}
|
|
258
414
|
return writer;
|
|
259
415
|
},
|
|
@@ -268,14 +424,14 @@ exports.CreateUserRequest = {
|
|
|
268
424
|
if (tag !== 10) {
|
|
269
425
|
break;
|
|
270
426
|
}
|
|
271
|
-
message.personal = exports.
|
|
427
|
+
message.personal = exports.CreateUserPersonal.decode(reader, reader.uint32());
|
|
272
428
|
continue;
|
|
273
429
|
}
|
|
274
430
|
case 2: {
|
|
275
431
|
if (tag !== 18) {
|
|
276
432
|
break;
|
|
277
433
|
}
|
|
278
|
-
message.authentication = exports.
|
|
434
|
+
message.authentication = exports.CreateUserAuthentication.decode(reader, reader.uint32());
|
|
279
435
|
continue;
|
|
280
436
|
}
|
|
281
437
|
}
|