geniebox-shared-lib 1.0.73 → 2.0.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.
Files changed (39) hide show
  1. package/dist/ai/ai.interface.d.ts +5 -0
  2. package/dist/ai/ai.interface.js +7 -1
  3. package/dist/ai.client.d.ts +12 -0
  4. package/dist/ai.client.js +42 -0
  5. package/dist/ai.interface.d.ts +133 -0
  6. package/dist/ai.interface.js +526 -0
  7. package/dist/auth.client.d.ts +11 -0
  8. package/dist/auth.client.js +44 -0
  9. package/dist/auth.interface.d.ts +248 -0
  10. package/dist/auth.interface.js +974 -0
  11. package/dist/event.client.d.ts +13 -0
  12. package/dist/event.client.js +48 -0
  13. package/dist/event.interface.d.ts +42 -0
  14. package/dist/event.interface.js +126 -0
  15. package/dist/file.interface.d.ts +90 -0
  16. package/dist/file.interface.js +332 -0
  17. package/dist/google/protobuf/empty.interface.d.ts +19 -0
  18. package/dist/google/protobuf/empty.interface.js +35 -0
  19. package/dist/index.d.ts +14 -14
  20. package/dist/index.js +25 -25
  21. package/dist/key.client.d.ts +12 -0
  22. package/dist/key.client.js +42 -0
  23. package/dist/key.interface.d.ts +134 -0
  24. package/dist/key.interface.js +430 -0
  25. package/dist/openai.client.d.ts +12 -0
  26. package/dist/openai.client.js +43 -0
  27. package/dist/openai.interface.d.ts +41 -0
  28. package/dist/openai.interface.js +116 -0
  29. package/dist/shared.module.d.ts +1 -1
  30. package/dist/shared.module.js +19 -19
  31. package/dist/storage.client.d.ts +12 -0
  32. package/dist/storage.client.js +43 -0
  33. package/dist/storage.interface.d.ts +90 -0
  34. package/dist/storage.interface.js +332 -0
  35. package/dist/user.client.d.ts +12 -0
  36. package/dist/user.client.js +42 -0
  37. package/dist/user.interface.d.ts +289 -0
  38. package/dist/user.interface.js +1264 -0
  39. package/package.json +2 -9
@@ -0,0 +1,1264 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.7
5
+ // protoc v5.28.2
6
+ // source: user.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.UserServiceService = exports.USER_SERVICE_NAME = exports.EmailVerificationStatusResponse = exports.UsersResponse = exports.UserResponse = exports.GetEmailVerificationStatusRequest = exports.UpdateEmailVerificationRequest = exports.RemoveUserRequest = exports.ResetPasswordData = exports.UpdatePasswordRequest = exports.UpdateUserPersonal = exports.UpdateUserRequest = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.GetByIdRequest = exports.CreateUserRequest = exports.CreateUserAuthentication = exports.CreateUserPersonal = exports.User = exports.UserAuthentication = exports.UserPersonal = exports.USER_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.UserServiceControllerMethods = UserServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const wire_1 = require("@bufbuild/protobuf/wire");
12
+ const microservices_1 = require("@nestjs/microservices");
13
+ const empty_interface_1 = require("./google/protobuf/empty.interface");
14
+ exports.protobufPackage = "user";
15
+ exports.USER_PACKAGE_NAME = "user";
16
+ function createBaseUserPersonal() {
17
+ return {
18
+ uuid: "",
19
+ userId: "",
20
+ photoUrl: "",
21
+ firstName: "",
22
+ lastName: "",
23
+ birthday: "",
24
+ gender: "",
25
+ email: "",
26
+ emailVerified: false,
27
+ phoneNumber: "",
28
+ createdAt: "",
29
+ updatedAt: "",
30
+ };
31
+ }
32
+ exports.UserPersonal = {
33
+ encode(message, writer = new wire_1.BinaryWriter()) {
34
+ if (message.uuid !== "") {
35
+ writer.uint32(10).string(message.uuid);
36
+ }
37
+ if (message.userId !== "") {
38
+ writer.uint32(18).string(message.userId);
39
+ }
40
+ if (message.photoUrl !== "") {
41
+ writer.uint32(26).string(message.photoUrl);
42
+ }
43
+ if (message.firstName !== "") {
44
+ writer.uint32(34).string(message.firstName);
45
+ }
46
+ if (message.lastName !== "") {
47
+ writer.uint32(42).string(message.lastName);
48
+ }
49
+ if (message.birthday !== "") {
50
+ writer.uint32(50).string(message.birthday);
51
+ }
52
+ if (message.gender !== "") {
53
+ writer.uint32(58).string(message.gender);
54
+ }
55
+ if (message.email !== "") {
56
+ writer.uint32(66).string(message.email);
57
+ }
58
+ if (message.emailVerified !== false) {
59
+ writer.uint32(72).bool(message.emailVerified);
60
+ }
61
+ if (message.phoneNumber !== "") {
62
+ writer.uint32(82).string(message.phoneNumber);
63
+ }
64
+ if (message.createdAt !== "") {
65
+ writer.uint32(90).string(message.createdAt);
66
+ }
67
+ if (message.updatedAt !== "") {
68
+ writer.uint32(98).string(message.updatedAt);
69
+ }
70
+ return writer;
71
+ },
72
+ decode(input, length) {
73
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
74
+ const end = length === undefined ? reader.len : reader.pos + length;
75
+ const message = createBaseUserPersonal();
76
+ while (reader.pos < end) {
77
+ const tag = reader.uint32();
78
+ switch (tag >>> 3) {
79
+ case 1: {
80
+ if (tag !== 10) {
81
+ break;
82
+ }
83
+ message.uuid = reader.string();
84
+ continue;
85
+ }
86
+ case 2: {
87
+ if (tag !== 18) {
88
+ break;
89
+ }
90
+ message.userId = reader.string();
91
+ continue;
92
+ }
93
+ case 3: {
94
+ if (tag !== 26) {
95
+ break;
96
+ }
97
+ message.photoUrl = reader.string();
98
+ continue;
99
+ }
100
+ case 4: {
101
+ if (tag !== 34) {
102
+ break;
103
+ }
104
+ message.firstName = reader.string();
105
+ continue;
106
+ }
107
+ case 5: {
108
+ if (tag !== 42) {
109
+ break;
110
+ }
111
+ message.lastName = reader.string();
112
+ continue;
113
+ }
114
+ case 6: {
115
+ if (tag !== 50) {
116
+ break;
117
+ }
118
+ message.birthday = reader.string();
119
+ continue;
120
+ }
121
+ case 7: {
122
+ if (tag !== 58) {
123
+ break;
124
+ }
125
+ message.gender = reader.string();
126
+ continue;
127
+ }
128
+ case 8: {
129
+ if (tag !== 66) {
130
+ break;
131
+ }
132
+ message.email = reader.string();
133
+ continue;
134
+ }
135
+ case 9: {
136
+ if (tag !== 72) {
137
+ break;
138
+ }
139
+ message.emailVerified = reader.bool();
140
+ continue;
141
+ }
142
+ case 10: {
143
+ if (tag !== 82) {
144
+ break;
145
+ }
146
+ message.phoneNumber = reader.string();
147
+ continue;
148
+ }
149
+ case 11: {
150
+ if (tag !== 90) {
151
+ break;
152
+ }
153
+ message.createdAt = reader.string();
154
+ continue;
155
+ }
156
+ case 12: {
157
+ if (tag !== 98) {
158
+ break;
159
+ }
160
+ message.updatedAt = reader.string();
161
+ continue;
162
+ }
163
+ }
164
+ if ((tag & 7) === 4 || tag === 0) {
165
+ break;
166
+ }
167
+ reader.skip(tag & 7);
168
+ }
169
+ return message;
170
+ },
171
+ };
172
+ function createBaseUserAuthentication() {
173
+ return { uuid: "", userId: "", passwordHash: "" };
174
+ }
175
+ exports.UserAuthentication = {
176
+ encode(message, writer = new wire_1.BinaryWriter()) {
177
+ if (message.uuid !== "") {
178
+ writer.uint32(10).string(message.uuid);
179
+ }
180
+ if (message.userId !== "") {
181
+ writer.uint32(18).string(message.userId);
182
+ }
183
+ if (message.password !== undefined) {
184
+ writer.uint32(26).string(message.password);
185
+ }
186
+ if (message.passwordHash !== "") {
187
+ writer.uint32(34).string(message.passwordHash);
188
+ }
189
+ return writer;
190
+ },
191
+ decode(input, length) {
192
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
193
+ const end = length === undefined ? reader.len : reader.pos + length;
194
+ const message = createBaseUserAuthentication();
195
+ while (reader.pos < end) {
196
+ const tag = reader.uint32();
197
+ switch (tag >>> 3) {
198
+ case 1: {
199
+ if (tag !== 10) {
200
+ break;
201
+ }
202
+ message.uuid = reader.string();
203
+ continue;
204
+ }
205
+ case 2: {
206
+ if (tag !== 18) {
207
+ break;
208
+ }
209
+ message.userId = reader.string();
210
+ continue;
211
+ }
212
+ case 3: {
213
+ if (tag !== 26) {
214
+ break;
215
+ }
216
+ message.password = reader.string();
217
+ continue;
218
+ }
219
+ case 4: {
220
+ if (tag !== 34) {
221
+ break;
222
+ }
223
+ message.passwordHash = reader.string();
224
+ continue;
225
+ }
226
+ }
227
+ if ((tag & 7) === 4 || tag === 0) {
228
+ break;
229
+ }
230
+ reader.skip(tag & 7);
231
+ }
232
+ return message;
233
+ },
234
+ };
235
+ function createBaseUser() {
236
+ return { uuid: "" };
237
+ }
238
+ exports.User = {
239
+ encode(message, writer = new wire_1.BinaryWriter()) {
240
+ if (message.uuid !== "") {
241
+ writer.uint32(10).string(message.uuid);
242
+ }
243
+ if (message.personal !== undefined) {
244
+ exports.UserPersonal.encode(message.personal, writer.uint32(18).fork()).join();
245
+ }
246
+ if (message.authentication !== undefined) {
247
+ exports.UserAuthentication.encode(message.authentication, writer.uint32(26).fork()).join();
248
+ }
249
+ return writer;
250
+ },
251
+ decode(input, length) {
252
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
253
+ const end = length === undefined ? reader.len : reader.pos + length;
254
+ const message = createBaseUser();
255
+ while (reader.pos < end) {
256
+ const tag = reader.uint32();
257
+ switch (tag >>> 3) {
258
+ case 1: {
259
+ if (tag !== 10) {
260
+ break;
261
+ }
262
+ message.uuid = reader.string();
263
+ continue;
264
+ }
265
+ case 2: {
266
+ if (tag !== 18) {
267
+ break;
268
+ }
269
+ message.personal = exports.UserPersonal.decode(reader, reader.uint32());
270
+ continue;
271
+ }
272
+ case 3: {
273
+ if (tag !== 26) {
274
+ break;
275
+ }
276
+ message.authentication = exports.UserAuthentication.decode(reader, reader.uint32());
277
+ continue;
278
+ }
279
+ }
280
+ if ((tag & 7) === 4 || tag === 0) {
281
+ break;
282
+ }
283
+ reader.skip(tag & 7);
284
+ }
285
+ return message;
286
+ },
287
+ };
288
+ function createBaseCreateUserPersonal() {
289
+ return { firstName: "" };
290
+ }
291
+ exports.CreateUserPersonal = {
292
+ encode(message, writer = new wire_1.BinaryWriter()) {
293
+ if (message.photoUrl !== undefined) {
294
+ writer.uint32(10).string(message.photoUrl);
295
+ }
296
+ if (message.firstName !== "") {
297
+ writer.uint32(18).string(message.firstName);
298
+ }
299
+ if (message.lastName !== undefined) {
300
+ writer.uint32(26).string(message.lastName);
301
+ }
302
+ if (message.birthday !== undefined) {
303
+ writer.uint32(34).string(message.birthday);
304
+ }
305
+ if (message.gender !== undefined) {
306
+ writer.uint32(42).string(message.gender);
307
+ }
308
+ if (message.email !== undefined) {
309
+ writer.uint32(50).string(message.email);
310
+ }
311
+ if (message.phoneNumber !== undefined) {
312
+ writer.uint32(58).string(message.phoneNumber);
313
+ }
314
+ return writer;
315
+ },
316
+ decode(input, length) {
317
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
318
+ const end = length === undefined ? reader.len : reader.pos + length;
319
+ const message = createBaseCreateUserPersonal();
320
+ while (reader.pos < end) {
321
+ const tag = reader.uint32();
322
+ switch (tag >>> 3) {
323
+ case 1: {
324
+ if (tag !== 10) {
325
+ break;
326
+ }
327
+ message.photoUrl = reader.string();
328
+ continue;
329
+ }
330
+ case 2: {
331
+ if (tag !== 18) {
332
+ break;
333
+ }
334
+ message.firstName = reader.string();
335
+ continue;
336
+ }
337
+ case 3: {
338
+ if (tag !== 26) {
339
+ break;
340
+ }
341
+ message.lastName = reader.string();
342
+ continue;
343
+ }
344
+ case 4: {
345
+ if (tag !== 34) {
346
+ break;
347
+ }
348
+ message.birthday = reader.string();
349
+ continue;
350
+ }
351
+ case 5: {
352
+ if (tag !== 42) {
353
+ break;
354
+ }
355
+ message.gender = reader.string();
356
+ continue;
357
+ }
358
+ case 6: {
359
+ if (tag !== 50) {
360
+ break;
361
+ }
362
+ message.email = reader.string();
363
+ continue;
364
+ }
365
+ case 7: {
366
+ if (tag !== 58) {
367
+ break;
368
+ }
369
+ message.phoneNumber = reader.string();
370
+ continue;
371
+ }
372
+ }
373
+ if ((tag & 7) === 4 || tag === 0) {
374
+ break;
375
+ }
376
+ reader.skip(tag & 7);
377
+ }
378
+ return message;
379
+ },
380
+ };
381
+ function createBaseCreateUserAuthentication() {
382
+ return {};
383
+ }
384
+ exports.CreateUserAuthentication = {
385
+ encode(message, writer = new wire_1.BinaryWriter()) {
386
+ if (message.password !== undefined) {
387
+ writer.uint32(10).string(message.password);
388
+ }
389
+ return writer;
390
+ },
391
+ decode(input, length) {
392
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
393
+ const end = length === undefined ? reader.len : reader.pos + length;
394
+ const message = createBaseCreateUserAuthentication();
395
+ while (reader.pos < end) {
396
+ const tag = reader.uint32();
397
+ switch (tag >>> 3) {
398
+ case 1: {
399
+ if (tag !== 10) {
400
+ break;
401
+ }
402
+ message.password = reader.string();
403
+ continue;
404
+ }
405
+ }
406
+ if ((tag & 7) === 4 || tag === 0) {
407
+ break;
408
+ }
409
+ reader.skip(tag & 7);
410
+ }
411
+ return message;
412
+ },
413
+ };
414
+ function createBaseCreateUserRequest() {
415
+ return {};
416
+ }
417
+ exports.CreateUserRequest = {
418
+ encode(message, writer = new wire_1.BinaryWriter()) {
419
+ if (message.personal !== undefined) {
420
+ exports.CreateUserPersonal.encode(message.personal, writer.uint32(10).fork()).join();
421
+ }
422
+ if (message.authentication !== undefined) {
423
+ exports.CreateUserAuthentication.encode(message.authentication, writer.uint32(18).fork()).join();
424
+ }
425
+ return writer;
426
+ },
427
+ decode(input, length) {
428
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
429
+ const end = length === undefined ? reader.len : reader.pos + length;
430
+ const message = createBaseCreateUserRequest();
431
+ while (reader.pos < end) {
432
+ const tag = reader.uint32();
433
+ switch (tag >>> 3) {
434
+ case 1: {
435
+ if (tag !== 10) {
436
+ break;
437
+ }
438
+ message.personal = exports.CreateUserPersonal.decode(reader, reader.uint32());
439
+ continue;
440
+ }
441
+ case 2: {
442
+ if (tag !== 18) {
443
+ break;
444
+ }
445
+ message.authentication = exports.CreateUserAuthentication.decode(reader, reader.uint32());
446
+ continue;
447
+ }
448
+ }
449
+ if ((tag & 7) === 4 || tag === 0) {
450
+ break;
451
+ }
452
+ reader.skip(tag & 7);
453
+ }
454
+ return message;
455
+ },
456
+ };
457
+ function createBaseGetByIdRequest() {
458
+ return { uuid: "" };
459
+ }
460
+ exports.GetByIdRequest = {
461
+ encode(message, writer = new wire_1.BinaryWriter()) {
462
+ if (message.uuid !== "") {
463
+ writer.uint32(10).string(message.uuid);
464
+ }
465
+ return writer;
466
+ },
467
+ decode(input, length) {
468
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
469
+ const end = length === undefined ? reader.len : reader.pos + length;
470
+ const message = createBaseGetByIdRequest();
471
+ while (reader.pos < end) {
472
+ const tag = reader.uint32();
473
+ switch (tag >>> 3) {
474
+ case 1: {
475
+ if (tag !== 10) {
476
+ break;
477
+ }
478
+ message.uuid = reader.string();
479
+ continue;
480
+ }
481
+ }
482
+ if ((tag & 7) === 4 || tag === 0) {
483
+ break;
484
+ }
485
+ reader.skip(tag & 7);
486
+ }
487
+ return message;
488
+ },
489
+ };
490
+ function createBaseFindByEmailRequest() {
491
+ return { email: "" };
492
+ }
493
+ exports.FindByEmailRequest = {
494
+ encode(message, writer = new wire_1.BinaryWriter()) {
495
+ if (message.email !== "") {
496
+ writer.uint32(10).string(message.email);
497
+ }
498
+ return writer;
499
+ },
500
+ decode(input, length) {
501
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
502
+ const end = length === undefined ? reader.len : reader.pos + length;
503
+ const message = createBaseFindByEmailRequest();
504
+ while (reader.pos < end) {
505
+ const tag = reader.uint32();
506
+ switch (tag >>> 3) {
507
+ case 1: {
508
+ if (tag !== 10) {
509
+ break;
510
+ }
511
+ message.email = reader.string();
512
+ continue;
513
+ }
514
+ }
515
+ if ((tag & 7) === 4 || tag === 0) {
516
+ break;
517
+ }
518
+ reader.skip(tag & 7);
519
+ }
520
+ return message;
521
+ },
522
+ };
523
+ function createBaseFindByPhoneRequest() {
524
+ return { phoneNumber: "" };
525
+ }
526
+ exports.FindByPhoneRequest = {
527
+ encode(message, writer = new wire_1.BinaryWriter()) {
528
+ if (message.phoneNumber !== "") {
529
+ writer.uint32(10).string(message.phoneNumber);
530
+ }
531
+ return writer;
532
+ },
533
+ decode(input, length) {
534
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
535
+ const end = length === undefined ? reader.len : reader.pos + length;
536
+ const message = createBaseFindByPhoneRequest();
537
+ while (reader.pos < end) {
538
+ const tag = reader.uint32();
539
+ switch (tag >>> 3) {
540
+ case 1: {
541
+ if (tag !== 10) {
542
+ break;
543
+ }
544
+ message.phoneNumber = reader.string();
545
+ continue;
546
+ }
547
+ }
548
+ if ((tag & 7) === 4 || tag === 0) {
549
+ break;
550
+ }
551
+ reader.skip(tag & 7);
552
+ }
553
+ return message;
554
+ },
555
+ };
556
+ function createBaseUpdateUserRequest() {
557
+ return { uuid: "" };
558
+ }
559
+ exports.UpdateUserRequest = {
560
+ encode(message, writer = new wire_1.BinaryWriter()) {
561
+ if (message.uuid !== "") {
562
+ writer.uint32(10).string(message.uuid);
563
+ }
564
+ if (message.personal !== undefined) {
565
+ exports.UpdateUserPersonal.encode(message.personal, writer.uint32(18).fork()).join();
566
+ }
567
+ if (message.authentication !== undefined) {
568
+ exports.UserAuthentication.encode(message.authentication, writer.uint32(26).fork()).join();
569
+ }
570
+ return writer;
571
+ },
572
+ decode(input, length) {
573
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
574
+ const end = length === undefined ? reader.len : reader.pos + length;
575
+ const message = createBaseUpdateUserRequest();
576
+ while (reader.pos < end) {
577
+ const tag = reader.uint32();
578
+ switch (tag >>> 3) {
579
+ case 1: {
580
+ if (tag !== 10) {
581
+ break;
582
+ }
583
+ message.uuid = reader.string();
584
+ continue;
585
+ }
586
+ case 2: {
587
+ if (tag !== 18) {
588
+ break;
589
+ }
590
+ message.personal = exports.UpdateUserPersonal.decode(reader, reader.uint32());
591
+ continue;
592
+ }
593
+ case 3: {
594
+ if (tag !== 26) {
595
+ break;
596
+ }
597
+ message.authentication = exports.UserAuthentication.decode(reader, reader.uint32());
598
+ continue;
599
+ }
600
+ }
601
+ if ((tag & 7) === 4 || tag === 0) {
602
+ break;
603
+ }
604
+ reader.skip(tag & 7);
605
+ }
606
+ return message;
607
+ },
608
+ };
609
+ function createBaseUpdateUserPersonal() {
610
+ return { firstName: "" };
611
+ }
612
+ exports.UpdateUserPersonal = {
613
+ encode(message, writer = new wire_1.BinaryWriter()) {
614
+ if (message.uuid !== undefined) {
615
+ writer.uint32(10).string(message.uuid);
616
+ }
617
+ if (message.photoUrl !== undefined) {
618
+ writer.uint32(18).string(message.photoUrl);
619
+ }
620
+ if (message.firstName !== "") {
621
+ writer.uint32(26).string(message.firstName);
622
+ }
623
+ if (message.lastName !== undefined) {
624
+ writer.uint32(34).string(message.lastName);
625
+ }
626
+ if (message.birthday !== undefined) {
627
+ writer.uint32(42).string(message.birthday);
628
+ }
629
+ if (message.gender !== undefined) {
630
+ writer.uint32(50).string(message.gender);
631
+ }
632
+ if (message.email !== undefined) {
633
+ writer.uint32(58).string(message.email);
634
+ }
635
+ if (message.phoneNumber !== undefined) {
636
+ writer.uint32(66).string(message.phoneNumber);
637
+ }
638
+ return writer;
639
+ },
640
+ decode(input, length) {
641
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
642
+ const end = length === undefined ? reader.len : reader.pos + length;
643
+ const message = createBaseUpdateUserPersonal();
644
+ while (reader.pos < end) {
645
+ const tag = reader.uint32();
646
+ switch (tag >>> 3) {
647
+ case 1: {
648
+ if (tag !== 10) {
649
+ break;
650
+ }
651
+ message.uuid = reader.string();
652
+ continue;
653
+ }
654
+ case 2: {
655
+ if (tag !== 18) {
656
+ break;
657
+ }
658
+ message.photoUrl = reader.string();
659
+ continue;
660
+ }
661
+ case 3: {
662
+ if (tag !== 26) {
663
+ break;
664
+ }
665
+ message.firstName = reader.string();
666
+ continue;
667
+ }
668
+ case 4: {
669
+ if (tag !== 34) {
670
+ break;
671
+ }
672
+ message.lastName = reader.string();
673
+ continue;
674
+ }
675
+ case 5: {
676
+ if (tag !== 42) {
677
+ break;
678
+ }
679
+ message.birthday = reader.string();
680
+ continue;
681
+ }
682
+ case 6: {
683
+ if (tag !== 50) {
684
+ break;
685
+ }
686
+ message.gender = reader.string();
687
+ continue;
688
+ }
689
+ case 7: {
690
+ if (tag !== 58) {
691
+ break;
692
+ }
693
+ message.email = reader.string();
694
+ continue;
695
+ }
696
+ case 8: {
697
+ if (tag !== 66) {
698
+ break;
699
+ }
700
+ message.phoneNumber = reader.string();
701
+ continue;
702
+ }
703
+ }
704
+ if ((tag & 7) === 4 || tag === 0) {
705
+ break;
706
+ }
707
+ reader.skip(tag & 7);
708
+ }
709
+ return message;
710
+ },
711
+ };
712
+ function createBaseUpdatePasswordRequest() {
713
+ return { oldPassword: "", newPassword: "" };
714
+ }
715
+ exports.UpdatePasswordRequest = {
716
+ encode(message, writer = new wire_1.BinaryWriter()) {
717
+ if (message.uuid !== undefined) {
718
+ writer.uint32(10).string(message.uuid);
719
+ }
720
+ if (message.oldPassword !== "") {
721
+ writer.uint32(18).string(message.oldPassword);
722
+ }
723
+ if (message.newPassword !== "") {
724
+ writer.uint32(26).string(message.newPassword);
725
+ }
726
+ return writer;
727
+ },
728
+ decode(input, length) {
729
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
730
+ const end = length === undefined ? reader.len : reader.pos + length;
731
+ const message = createBaseUpdatePasswordRequest();
732
+ while (reader.pos < end) {
733
+ const tag = reader.uint32();
734
+ switch (tag >>> 3) {
735
+ case 1: {
736
+ if (tag !== 10) {
737
+ break;
738
+ }
739
+ message.uuid = reader.string();
740
+ continue;
741
+ }
742
+ case 2: {
743
+ if (tag !== 18) {
744
+ break;
745
+ }
746
+ message.oldPassword = reader.string();
747
+ continue;
748
+ }
749
+ case 3: {
750
+ if (tag !== 26) {
751
+ break;
752
+ }
753
+ message.newPassword = reader.string();
754
+ continue;
755
+ }
756
+ }
757
+ if ((tag & 7) === 4 || tag === 0) {
758
+ break;
759
+ }
760
+ reader.skip(tag & 7);
761
+ }
762
+ return message;
763
+ },
764
+ };
765
+ function createBaseResetPasswordData() {
766
+ return { uuid: "", password: "" };
767
+ }
768
+ exports.ResetPasswordData = {
769
+ encode(message, writer = new wire_1.BinaryWriter()) {
770
+ if (message.uuid !== "") {
771
+ writer.uint32(10).string(message.uuid);
772
+ }
773
+ if (message.password !== "") {
774
+ writer.uint32(18).string(message.password);
775
+ }
776
+ return writer;
777
+ },
778
+ decode(input, length) {
779
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
780
+ const end = length === undefined ? reader.len : reader.pos + length;
781
+ const message = createBaseResetPasswordData();
782
+ while (reader.pos < end) {
783
+ const tag = reader.uint32();
784
+ switch (tag >>> 3) {
785
+ case 1: {
786
+ if (tag !== 10) {
787
+ break;
788
+ }
789
+ message.uuid = reader.string();
790
+ continue;
791
+ }
792
+ case 2: {
793
+ if (tag !== 18) {
794
+ break;
795
+ }
796
+ message.password = reader.string();
797
+ continue;
798
+ }
799
+ }
800
+ if ((tag & 7) === 4 || tag === 0) {
801
+ break;
802
+ }
803
+ reader.skip(tag & 7);
804
+ }
805
+ return message;
806
+ },
807
+ };
808
+ function createBaseRemoveUserRequest() {
809
+ return { uuid: "" };
810
+ }
811
+ exports.RemoveUserRequest = {
812
+ encode(message, writer = new wire_1.BinaryWriter()) {
813
+ if (message.uuid !== "") {
814
+ writer.uint32(10).string(message.uuid);
815
+ }
816
+ return writer;
817
+ },
818
+ decode(input, length) {
819
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
820
+ const end = length === undefined ? reader.len : reader.pos + length;
821
+ const message = createBaseRemoveUserRequest();
822
+ while (reader.pos < end) {
823
+ const tag = reader.uint32();
824
+ switch (tag >>> 3) {
825
+ case 1: {
826
+ if (tag !== 10) {
827
+ break;
828
+ }
829
+ message.uuid = reader.string();
830
+ continue;
831
+ }
832
+ }
833
+ if ((tag & 7) === 4 || tag === 0) {
834
+ break;
835
+ }
836
+ reader.skip(tag & 7);
837
+ }
838
+ return message;
839
+ },
840
+ };
841
+ function createBaseUpdateEmailVerificationRequest() {
842
+ return { userId: "", verified: false };
843
+ }
844
+ exports.UpdateEmailVerificationRequest = {
845
+ encode(message, writer = new wire_1.BinaryWriter()) {
846
+ if (message.userId !== "") {
847
+ writer.uint32(10).string(message.userId);
848
+ }
849
+ if (message.verified !== false) {
850
+ writer.uint32(16).bool(message.verified);
851
+ }
852
+ return writer;
853
+ },
854
+ decode(input, length) {
855
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
856
+ const end = length === undefined ? reader.len : reader.pos + length;
857
+ const message = createBaseUpdateEmailVerificationRequest();
858
+ while (reader.pos < end) {
859
+ const tag = reader.uint32();
860
+ switch (tag >>> 3) {
861
+ case 1: {
862
+ if (tag !== 10) {
863
+ break;
864
+ }
865
+ message.userId = reader.string();
866
+ continue;
867
+ }
868
+ case 2: {
869
+ if (tag !== 16) {
870
+ break;
871
+ }
872
+ message.verified = reader.bool();
873
+ continue;
874
+ }
875
+ }
876
+ if ((tag & 7) === 4 || tag === 0) {
877
+ break;
878
+ }
879
+ reader.skip(tag & 7);
880
+ }
881
+ return message;
882
+ },
883
+ };
884
+ function createBaseGetEmailVerificationStatusRequest() {
885
+ return { uuid: "" };
886
+ }
887
+ exports.GetEmailVerificationStatusRequest = {
888
+ encode(message, writer = new wire_1.BinaryWriter()) {
889
+ if (message.uuid !== "") {
890
+ writer.uint32(10).string(message.uuid);
891
+ }
892
+ return writer;
893
+ },
894
+ decode(input, length) {
895
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
896
+ const end = length === undefined ? reader.len : reader.pos + length;
897
+ const message = createBaseGetEmailVerificationStatusRequest();
898
+ while (reader.pos < end) {
899
+ const tag = reader.uint32();
900
+ switch (tag >>> 3) {
901
+ case 1: {
902
+ if (tag !== 10) {
903
+ break;
904
+ }
905
+ message.uuid = reader.string();
906
+ continue;
907
+ }
908
+ }
909
+ if ((tag & 7) === 4 || tag === 0) {
910
+ break;
911
+ }
912
+ reader.skip(tag & 7);
913
+ }
914
+ return message;
915
+ },
916
+ };
917
+ function createBaseUserResponse() {
918
+ return {
919
+ uuid: "",
920
+ photoUrl: "",
921
+ firstName: "",
922
+ lastName: "",
923
+ birthday: "",
924
+ gender: "",
925
+ phoneNumber: "",
926
+ email: "",
927
+ createdAt: "",
928
+ updatedAt: "",
929
+ };
930
+ }
931
+ exports.UserResponse = {
932
+ encode(message, writer = new wire_1.BinaryWriter()) {
933
+ if (message.uuid !== "") {
934
+ writer.uint32(10).string(message.uuid);
935
+ }
936
+ if (message.photoUrl !== "") {
937
+ writer.uint32(18).string(message.photoUrl);
938
+ }
939
+ if (message.firstName !== "") {
940
+ writer.uint32(26).string(message.firstName);
941
+ }
942
+ if (message.lastName !== "") {
943
+ writer.uint32(34).string(message.lastName);
944
+ }
945
+ if (message.birthday !== "") {
946
+ writer.uint32(42).string(message.birthday);
947
+ }
948
+ if (message.gender !== "") {
949
+ writer.uint32(50).string(message.gender);
950
+ }
951
+ if (message.phoneNumber !== "") {
952
+ writer.uint32(58).string(message.phoneNumber);
953
+ }
954
+ if (message.email !== "") {
955
+ writer.uint32(66).string(message.email);
956
+ }
957
+ if (message.createdAt !== "") {
958
+ writer.uint32(74).string(message.createdAt);
959
+ }
960
+ if (message.updatedAt !== "") {
961
+ writer.uint32(82).string(message.updatedAt);
962
+ }
963
+ return writer;
964
+ },
965
+ decode(input, length) {
966
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
967
+ const end = length === undefined ? reader.len : reader.pos + length;
968
+ const message = createBaseUserResponse();
969
+ while (reader.pos < end) {
970
+ const tag = reader.uint32();
971
+ switch (tag >>> 3) {
972
+ case 1: {
973
+ if (tag !== 10) {
974
+ break;
975
+ }
976
+ message.uuid = reader.string();
977
+ continue;
978
+ }
979
+ case 2: {
980
+ if (tag !== 18) {
981
+ break;
982
+ }
983
+ message.photoUrl = reader.string();
984
+ continue;
985
+ }
986
+ case 3: {
987
+ if (tag !== 26) {
988
+ break;
989
+ }
990
+ message.firstName = reader.string();
991
+ continue;
992
+ }
993
+ case 4: {
994
+ if (tag !== 34) {
995
+ break;
996
+ }
997
+ message.lastName = reader.string();
998
+ continue;
999
+ }
1000
+ case 5: {
1001
+ if (tag !== 42) {
1002
+ break;
1003
+ }
1004
+ message.birthday = reader.string();
1005
+ continue;
1006
+ }
1007
+ case 6: {
1008
+ if (tag !== 50) {
1009
+ break;
1010
+ }
1011
+ message.gender = reader.string();
1012
+ continue;
1013
+ }
1014
+ case 7: {
1015
+ if (tag !== 58) {
1016
+ break;
1017
+ }
1018
+ message.phoneNumber = reader.string();
1019
+ continue;
1020
+ }
1021
+ case 8: {
1022
+ if (tag !== 66) {
1023
+ break;
1024
+ }
1025
+ message.email = reader.string();
1026
+ continue;
1027
+ }
1028
+ case 9: {
1029
+ if (tag !== 74) {
1030
+ break;
1031
+ }
1032
+ message.createdAt = reader.string();
1033
+ continue;
1034
+ }
1035
+ case 10: {
1036
+ if (tag !== 82) {
1037
+ break;
1038
+ }
1039
+ message.updatedAt = reader.string();
1040
+ continue;
1041
+ }
1042
+ }
1043
+ if ((tag & 7) === 4 || tag === 0) {
1044
+ break;
1045
+ }
1046
+ reader.skip(tag & 7);
1047
+ }
1048
+ return message;
1049
+ },
1050
+ };
1051
+ function createBaseUsersResponse() {
1052
+ return { users: [] };
1053
+ }
1054
+ exports.UsersResponse = {
1055
+ encode(message, writer = new wire_1.BinaryWriter()) {
1056
+ for (const v of message.users) {
1057
+ exports.UserResponse.encode(v, writer.uint32(10).fork()).join();
1058
+ }
1059
+ return writer;
1060
+ },
1061
+ decode(input, length) {
1062
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1063
+ const end = length === undefined ? reader.len : reader.pos + length;
1064
+ const message = createBaseUsersResponse();
1065
+ while (reader.pos < end) {
1066
+ const tag = reader.uint32();
1067
+ switch (tag >>> 3) {
1068
+ case 1: {
1069
+ if (tag !== 10) {
1070
+ break;
1071
+ }
1072
+ message.users.push(exports.UserResponse.decode(reader, reader.uint32()));
1073
+ continue;
1074
+ }
1075
+ }
1076
+ if ((tag & 7) === 4 || tag === 0) {
1077
+ break;
1078
+ }
1079
+ reader.skip(tag & 7);
1080
+ }
1081
+ return message;
1082
+ },
1083
+ };
1084
+ function createBaseEmailVerificationStatusResponse() {
1085
+ return { userId: "", emailVerified: false };
1086
+ }
1087
+ exports.EmailVerificationStatusResponse = {
1088
+ encode(message, writer = new wire_1.BinaryWriter()) {
1089
+ if (message.userId !== "") {
1090
+ writer.uint32(10).string(message.userId);
1091
+ }
1092
+ if (message.emailVerified !== false) {
1093
+ writer.uint32(16).bool(message.emailVerified);
1094
+ }
1095
+ return writer;
1096
+ },
1097
+ decode(input, length) {
1098
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1099
+ const end = length === undefined ? reader.len : reader.pos + length;
1100
+ const message = createBaseEmailVerificationStatusResponse();
1101
+ while (reader.pos < end) {
1102
+ const tag = reader.uint32();
1103
+ switch (tag >>> 3) {
1104
+ case 1: {
1105
+ if (tag !== 10) {
1106
+ break;
1107
+ }
1108
+ message.userId = reader.string();
1109
+ continue;
1110
+ }
1111
+ case 2: {
1112
+ if (tag !== 16) {
1113
+ break;
1114
+ }
1115
+ message.emailVerified = reader.bool();
1116
+ continue;
1117
+ }
1118
+ }
1119
+ if ((tag & 7) === 4 || tag === 0) {
1120
+ break;
1121
+ }
1122
+ reader.skip(tag & 7);
1123
+ }
1124
+ return message;
1125
+ },
1126
+ };
1127
+ function UserServiceControllerMethods() {
1128
+ return function (constructor) {
1129
+ const grpcMethods = [
1130
+ "create",
1131
+ "findOne",
1132
+ "findByEmail",
1133
+ "findByPhone",
1134
+ "findAll",
1135
+ "update",
1136
+ "updatePersonal",
1137
+ "updatePassword",
1138
+ "resetPassword",
1139
+ "remove",
1140
+ "updateEmailVerification",
1141
+ "getEmailVerificationStatus",
1142
+ ];
1143
+ for (const method of grpcMethods) {
1144
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
1145
+ (0, microservices_1.GrpcMethod)("UserService", method)(constructor.prototype[method], method, descriptor);
1146
+ }
1147
+ const grpcStreamMethods = [];
1148
+ for (const method of grpcStreamMethods) {
1149
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
1150
+ (0, microservices_1.GrpcStreamMethod)("UserService", method)(constructor.prototype[method], method, descriptor);
1151
+ }
1152
+ };
1153
+ }
1154
+ exports.USER_SERVICE_NAME = "UserService";
1155
+ exports.UserServiceService = {
1156
+ create: {
1157
+ path: "/user.UserService/create",
1158
+ requestStream: false,
1159
+ responseStream: false,
1160
+ requestSerialize: (value) => Buffer.from(exports.CreateUserRequest.encode(value).finish()),
1161
+ requestDeserialize: (value) => exports.CreateUserRequest.decode(value),
1162
+ responseSerialize: (value) => Buffer.from(exports.UserResponse.encode(value).finish()),
1163
+ responseDeserialize: (value) => exports.UserResponse.decode(value),
1164
+ },
1165
+ findOne: {
1166
+ path: "/user.UserService/findOne",
1167
+ requestStream: false,
1168
+ responseStream: false,
1169
+ requestSerialize: (value) => Buffer.from(exports.GetByIdRequest.encode(value).finish()),
1170
+ requestDeserialize: (value) => exports.GetByIdRequest.decode(value),
1171
+ responseSerialize: (value) => Buffer.from(exports.UserResponse.encode(value).finish()),
1172
+ responseDeserialize: (value) => exports.UserResponse.decode(value),
1173
+ },
1174
+ findByEmail: {
1175
+ path: "/user.UserService/findByEmail",
1176
+ requestStream: false,
1177
+ responseStream: false,
1178
+ requestSerialize: (value) => Buffer.from(exports.FindByEmailRequest.encode(value).finish()),
1179
+ requestDeserialize: (value) => exports.FindByEmailRequest.decode(value),
1180
+ responseSerialize: (value) => Buffer.from(exports.User.encode(value).finish()),
1181
+ responseDeserialize: (value) => exports.User.decode(value),
1182
+ },
1183
+ findByPhone: {
1184
+ path: "/user.UserService/findByPhone",
1185
+ requestStream: false,
1186
+ responseStream: false,
1187
+ requestSerialize: (value) => Buffer.from(exports.FindByPhoneRequest.encode(value).finish()),
1188
+ requestDeserialize: (value) => exports.FindByPhoneRequest.decode(value),
1189
+ responseSerialize: (value) => Buffer.from(exports.User.encode(value).finish()),
1190
+ responseDeserialize: (value) => exports.User.decode(value),
1191
+ },
1192
+ findAll: {
1193
+ path: "/user.UserService/findAll",
1194
+ requestStream: false,
1195
+ responseStream: false,
1196
+ requestSerialize: (value) => Buffer.from(empty_interface_1.Empty.encode(value).finish()),
1197
+ requestDeserialize: (value) => empty_interface_1.Empty.decode(value),
1198
+ responseSerialize: (value) => Buffer.from(exports.UsersResponse.encode(value).finish()),
1199
+ responseDeserialize: (value) => exports.UsersResponse.decode(value),
1200
+ },
1201
+ update: {
1202
+ path: "/user.UserService/update",
1203
+ requestStream: false,
1204
+ responseStream: false,
1205
+ requestSerialize: (value) => Buffer.from(exports.UpdateUserRequest.encode(value).finish()),
1206
+ requestDeserialize: (value) => exports.UpdateUserRequest.decode(value),
1207
+ responseSerialize: (value) => Buffer.from(exports.UserResponse.encode(value).finish()),
1208
+ responseDeserialize: (value) => exports.UserResponse.decode(value),
1209
+ },
1210
+ updatePersonal: {
1211
+ path: "/user.UserService/updatePersonal",
1212
+ requestStream: false,
1213
+ responseStream: false,
1214
+ requestSerialize: (value) => Buffer.from(exports.UpdateUserPersonal.encode(value).finish()),
1215
+ requestDeserialize: (value) => exports.UpdateUserPersonal.decode(value),
1216
+ responseSerialize: (value) => Buffer.from(exports.UserResponse.encode(value).finish()),
1217
+ responseDeserialize: (value) => exports.UserResponse.decode(value),
1218
+ },
1219
+ updatePassword: {
1220
+ path: "/user.UserService/updatePassword",
1221
+ requestStream: false,
1222
+ responseStream: false,
1223
+ requestSerialize: (value) => Buffer.from(exports.UpdatePasswordRequest.encode(value).finish()),
1224
+ requestDeserialize: (value) => exports.UpdatePasswordRequest.decode(value),
1225
+ responseSerialize: (value) => Buffer.from(empty_interface_1.Empty.encode(value).finish()),
1226
+ responseDeserialize: (value) => empty_interface_1.Empty.decode(value),
1227
+ },
1228
+ resetPassword: {
1229
+ path: "/user.UserService/resetPassword",
1230
+ requestStream: false,
1231
+ responseStream: false,
1232
+ requestSerialize: (value) => Buffer.from(exports.ResetPasswordData.encode(value).finish()),
1233
+ requestDeserialize: (value) => exports.ResetPasswordData.decode(value),
1234
+ responseSerialize: (value) => Buffer.from(empty_interface_1.Empty.encode(value).finish()),
1235
+ responseDeserialize: (value) => empty_interface_1.Empty.decode(value),
1236
+ },
1237
+ remove: {
1238
+ path: "/user.UserService/remove",
1239
+ requestStream: false,
1240
+ responseStream: false,
1241
+ requestSerialize: (value) => Buffer.from(exports.RemoveUserRequest.encode(value).finish()),
1242
+ requestDeserialize: (value) => exports.RemoveUserRequest.decode(value),
1243
+ responseSerialize: (value) => Buffer.from(empty_interface_1.Empty.encode(value).finish()),
1244
+ responseDeserialize: (value) => empty_interface_1.Empty.decode(value),
1245
+ },
1246
+ updateEmailVerification: {
1247
+ path: "/user.UserService/updateEmailVerification",
1248
+ requestStream: false,
1249
+ responseStream: false,
1250
+ requestSerialize: (value) => Buffer.from(exports.UpdateEmailVerificationRequest.encode(value).finish()),
1251
+ requestDeserialize: (value) => exports.UpdateEmailVerificationRequest.decode(value),
1252
+ responseSerialize: (value) => Buffer.from(exports.EmailVerificationStatusResponse.encode(value).finish()),
1253
+ responseDeserialize: (value) => exports.EmailVerificationStatusResponse.decode(value),
1254
+ },
1255
+ getEmailVerificationStatus: {
1256
+ path: "/user.UserService/getEmailVerificationStatus",
1257
+ requestStream: false,
1258
+ responseStream: false,
1259
+ requestSerialize: (value) => Buffer.from(exports.GetEmailVerificationStatusRequest.encode(value).finish()),
1260
+ requestDeserialize: (value) => exports.GetEmailVerificationStatusRequest.decode(value),
1261
+ responseSerialize: (value) => Buffer.from(exports.EmailVerificationStatusResponse.encode(value).finish()),
1262
+ responseDeserialize: (value) => exports.EmailVerificationStatusResponse.decode(value),
1263
+ },
1264
+ };