geniebox-shared-lib 2.0.3 → 2.1.1

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.
@@ -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.EmailVerificationStatusResponse = exports.UsersResponse = exports.UserResponse = exports.FindUsersByIdsRequest = exports.GetEmailVerificationStatusRequest = exports.UpdateEmailVerificationRequest = exports.RemoveUserRequest = exports.ResetPasswordData = exports.UpdatePasswordRequest = exports.UpdateUserPersonal = exports.UpdateUserRequest = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.FindOneRequest = exports.CreateUserRequest = exports.CreateUserAuthentication = exports.CreateUserPersonal = exports.User = exports.UserAuthentication = exports.UserPersonal = exports.USER_PACKAGE_NAME = exports.protobufPackage = void 0;
8
+ exports.UserServiceService = exports.USER_SERVICE_NAME = exports.UserSettingsResponse = exports.EmailVerificationStatusResponse = exports.UsersResponse = exports.UserResponse = exports.CreateUserSettingsRequest = exports.UpdateUserSettingsRequest = exports.GetUserSettingsRequest = exports.GetEmailVerificationStatusRequest = exports.UpdateEmailVerificationRequest = exports.RemoveUserRequest = exports.ResetPasswordData = exports.UpdatePasswordRequest = exports.UpdateUserPersonal = exports.UpdateUserRequest = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.FindOneRequest = exports.CreateUserRequest = exports.CreateUserAuthentication = exports.CreateUserPersonal = exports.User = exports.UserAuthentication = exports.UserAppearanceSettings = exports.UserPrivacySettings = exports.UserInAppNotifications = exports.UserPushNotifications = exports.UserEmailNotifications = exports.UserNotificationSettings = exports.UserSettings = 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");
@@ -169,6 +169,477 @@ exports.UserPersonal = {
169
169
  return message;
170
170
  },
171
171
  };
172
+ function createBaseUserSettings() {
173
+ return { uuid: "", userId: "", theme: "", language: "", createdAt: "", updatedAt: "" };
174
+ }
175
+ exports.UserSettings = {
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.theme !== "") {
184
+ writer.uint32(26).string(message.theme);
185
+ }
186
+ if (message.language !== "") {
187
+ writer.uint32(34).string(message.language);
188
+ }
189
+ if (message.notifications !== undefined) {
190
+ exports.UserNotificationSettings.encode(message.notifications, writer.uint32(42).fork()).join();
191
+ }
192
+ if (message.privacy !== undefined) {
193
+ exports.UserPrivacySettings.encode(message.privacy, writer.uint32(50).fork()).join();
194
+ }
195
+ if (message.appearance !== undefined) {
196
+ exports.UserAppearanceSettings.encode(message.appearance, writer.uint32(58).fork()).join();
197
+ }
198
+ if (message.createdAt !== "") {
199
+ writer.uint32(66).string(message.createdAt);
200
+ }
201
+ if (message.updatedAt !== "") {
202
+ writer.uint32(74).string(message.updatedAt);
203
+ }
204
+ return writer;
205
+ },
206
+ decode(input, length) {
207
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
208
+ const end = length === undefined ? reader.len : reader.pos + length;
209
+ const message = createBaseUserSettings();
210
+ while (reader.pos < end) {
211
+ const tag = reader.uint32();
212
+ switch (tag >>> 3) {
213
+ case 1: {
214
+ if (tag !== 10) {
215
+ break;
216
+ }
217
+ message.uuid = reader.string();
218
+ continue;
219
+ }
220
+ case 2: {
221
+ if (tag !== 18) {
222
+ break;
223
+ }
224
+ message.userId = reader.string();
225
+ continue;
226
+ }
227
+ case 3: {
228
+ if (tag !== 26) {
229
+ break;
230
+ }
231
+ message.theme = reader.string();
232
+ continue;
233
+ }
234
+ case 4: {
235
+ if (tag !== 34) {
236
+ break;
237
+ }
238
+ message.language = reader.string();
239
+ continue;
240
+ }
241
+ case 5: {
242
+ if (tag !== 42) {
243
+ break;
244
+ }
245
+ message.notifications = exports.UserNotificationSettings.decode(reader, reader.uint32());
246
+ continue;
247
+ }
248
+ case 6: {
249
+ if (tag !== 50) {
250
+ break;
251
+ }
252
+ message.privacy = exports.UserPrivacySettings.decode(reader, reader.uint32());
253
+ continue;
254
+ }
255
+ case 7: {
256
+ if (tag !== 58) {
257
+ break;
258
+ }
259
+ message.appearance = exports.UserAppearanceSettings.decode(reader, reader.uint32());
260
+ continue;
261
+ }
262
+ case 8: {
263
+ if (tag !== 66) {
264
+ break;
265
+ }
266
+ message.createdAt = reader.string();
267
+ continue;
268
+ }
269
+ case 9: {
270
+ if (tag !== 74) {
271
+ break;
272
+ }
273
+ message.updatedAt = reader.string();
274
+ continue;
275
+ }
276
+ }
277
+ if ((tag & 7) === 4 || tag === 0) {
278
+ break;
279
+ }
280
+ reader.skip(tag & 7);
281
+ }
282
+ return message;
283
+ },
284
+ };
285
+ function createBaseUserNotificationSettings() {
286
+ return {};
287
+ }
288
+ exports.UserNotificationSettings = {
289
+ encode(message, writer = new wire_1.BinaryWriter()) {
290
+ if (message.email !== undefined) {
291
+ exports.UserEmailNotifications.encode(message.email, writer.uint32(10).fork()).join();
292
+ }
293
+ if (message.push !== undefined) {
294
+ exports.UserPushNotifications.encode(message.push, writer.uint32(18).fork()).join();
295
+ }
296
+ if (message.inApp !== undefined) {
297
+ exports.UserInAppNotifications.encode(message.inApp, writer.uint32(26).fork()).join();
298
+ }
299
+ return writer;
300
+ },
301
+ decode(input, length) {
302
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
303
+ const end = length === undefined ? reader.len : reader.pos + length;
304
+ const message = createBaseUserNotificationSettings();
305
+ while (reader.pos < end) {
306
+ const tag = reader.uint32();
307
+ switch (tag >>> 3) {
308
+ case 1: {
309
+ if (tag !== 10) {
310
+ break;
311
+ }
312
+ message.email = exports.UserEmailNotifications.decode(reader, reader.uint32());
313
+ continue;
314
+ }
315
+ case 2: {
316
+ if (tag !== 18) {
317
+ break;
318
+ }
319
+ message.push = exports.UserPushNotifications.decode(reader, reader.uint32());
320
+ continue;
321
+ }
322
+ case 3: {
323
+ if (tag !== 26) {
324
+ break;
325
+ }
326
+ message.inApp = exports.UserInAppNotifications.decode(reader, reader.uint32());
327
+ continue;
328
+ }
329
+ }
330
+ if ((tag & 7) === 4 || tag === 0) {
331
+ break;
332
+ }
333
+ reader.skip(tag & 7);
334
+ }
335
+ return message;
336
+ },
337
+ };
338
+ function createBaseUserEmailNotifications() {
339
+ return { enabled: false, marketing: false, security: false, updates: false };
340
+ }
341
+ exports.UserEmailNotifications = {
342
+ encode(message, writer = new wire_1.BinaryWriter()) {
343
+ if (message.enabled !== false) {
344
+ writer.uint32(8).bool(message.enabled);
345
+ }
346
+ if (message.marketing !== false) {
347
+ writer.uint32(16).bool(message.marketing);
348
+ }
349
+ if (message.security !== false) {
350
+ writer.uint32(24).bool(message.security);
351
+ }
352
+ if (message.updates !== false) {
353
+ writer.uint32(32).bool(message.updates);
354
+ }
355
+ return writer;
356
+ },
357
+ decode(input, length) {
358
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
359
+ const end = length === undefined ? reader.len : reader.pos + length;
360
+ const message = createBaseUserEmailNotifications();
361
+ while (reader.pos < end) {
362
+ const tag = reader.uint32();
363
+ switch (tag >>> 3) {
364
+ case 1: {
365
+ if (tag !== 8) {
366
+ break;
367
+ }
368
+ message.enabled = reader.bool();
369
+ continue;
370
+ }
371
+ case 2: {
372
+ if (tag !== 16) {
373
+ break;
374
+ }
375
+ message.marketing = reader.bool();
376
+ continue;
377
+ }
378
+ case 3: {
379
+ if (tag !== 24) {
380
+ break;
381
+ }
382
+ message.security = reader.bool();
383
+ continue;
384
+ }
385
+ case 4: {
386
+ if (tag !== 32) {
387
+ break;
388
+ }
389
+ message.updates = reader.bool();
390
+ continue;
391
+ }
392
+ }
393
+ if ((tag & 7) === 4 || tag === 0) {
394
+ break;
395
+ }
396
+ reader.skip(tag & 7);
397
+ }
398
+ return message;
399
+ },
400
+ };
401
+ function createBaseUserPushNotifications() {
402
+ return { enabled: false, marketing: false, security: false, updates: false };
403
+ }
404
+ exports.UserPushNotifications = {
405
+ encode(message, writer = new wire_1.BinaryWriter()) {
406
+ if (message.enabled !== false) {
407
+ writer.uint32(8).bool(message.enabled);
408
+ }
409
+ if (message.marketing !== false) {
410
+ writer.uint32(16).bool(message.marketing);
411
+ }
412
+ if (message.security !== false) {
413
+ writer.uint32(24).bool(message.security);
414
+ }
415
+ if (message.updates !== false) {
416
+ writer.uint32(32).bool(message.updates);
417
+ }
418
+ return writer;
419
+ },
420
+ decode(input, length) {
421
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
422
+ const end = length === undefined ? reader.len : reader.pos + length;
423
+ const message = createBaseUserPushNotifications();
424
+ while (reader.pos < end) {
425
+ const tag = reader.uint32();
426
+ switch (tag >>> 3) {
427
+ case 1: {
428
+ if (tag !== 8) {
429
+ break;
430
+ }
431
+ message.enabled = reader.bool();
432
+ continue;
433
+ }
434
+ case 2: {
435
+ if (tag !== 16) {
436
+ break;
437
+ }
438
+ message.marketing = reader.bool();
439
+ continue;
440
+ }
441
+ case 3: {
442
+ if (tag !== 24) {
443
+ break;
444
+ }
445
+ message.security = reader.bool();
446
+ continue;
447
+ }
448
+ case 4: {
449
+ if (tag !== 32) {
450
+ break;
451
+ }
452
+ message.updates = reader.bool();
453
+ continue;
454
+ }
455
+ }
456
+ if ((tag & 7) === 4 || tag === 0) {
457
+ break;
458
+ }
459
+ reader.skip(tag & 7);
460
+ }
461
+ return message;
462
+ },
463
+ };
464
+ function createBaseUserInAppNotifications() {
465
+ return { enabled: false, marketing: false, security: false, updates: false };
466
+ }
467
+ exports.UserInAppNotifications = {
468
+ encode(message, writer = new wire_1.BinaryWriter()) {
469
+ if (message.enabled !== false) {
470
+ writer.uint32(8).bool(message.enabled);
471
+ }
472
+ if (message.marketing !== false) {
473
+ writer.uint32(16).bool(message.marketing);
474
+ }
475
+ if (message.security !== false) {
476
+ writer.uint32(24).bool(message.security);
477
+ }
478
+ if (message.updates !== false) {
479
+ writer.uint32(32).bool(message.updates);
480
+ }
481
+ return writer;
482
+ },
483
+ decode(input, length) {
484
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
485
+ const end = length === undefined ? reader.len : reader.pos + length;
486
+ const message = createBaseUserInAppNotifications();
487
+ while (reader.pos < end) {
488
+ const tag = reader.uint32();
489
+ switch (tag >>> 3) {
490
+ case 1: {
491
+ if (tag !== 8) {
492
+ break;
493
+ }
494
+ message.enabled = reader.bool();
495
+ continue;
496
+ }
497
+ case 2: {
498
+ if (tag !== 16) {
499
+ break;
500
+ }
501
+ message.marketing = reader.bool();
502
+ continue;
503
+ }
504
+ case 3: {
505
+ if (tag !== 24) {
506
+ break;
507
+ }
508
+ message.security = reader.bool();
509
+ continue;
510
+ }
511
+ case 4: {
512
+ if (tag !== 32) {
513
+ break;
514
+ }
515
+ message.updates = reader.bool();
516
+ continue;
517
+ }
518
+ }
519
+ if ((tag & 7) === 4 || tag === 0) {
520
+ break;
521
+ }
522
+ reader.skip(tag & 7);
523
+ }
524
+ return message;
525
+ },
526
+ };
527
+ function createBaseUserPrivacySettings() {
528
+ return { profileVisibility: "", showEmail: false, showPhone: false, allowAnalytics: false };
529
+ }
530
+ exports.UserPrivacySettings = {
531
+ encode(message, writer = new wire_1.BinaryWriter()) {
532
+ if (message.profileVisibility !== "") {
533
+ writer.uint32(10).string(message.profileVisibility);
534
+ }
535
+ if (message.showEmail !== false) {
536
+ writer.uint32(16).bool(message.showEmail);
537
+ }
538
+ if (message.showPhone !== false) {
539
+ writer.uint32(24).bool(message.showPhone);
540
+ }
541
+ if (message.allowAnalytics !== false) {
542
+ writer.uint32(32).bool(message.allowAnalytics);
543
+ }
544
+ return writer;
545
+ },
546
+ decode(input, length) {
547
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
548
+ const end = length === undefined ? reader.len : reader.pos + length;
549
+ const message = createBaseUserPrivacySettings();
550
+ while (reader.pos < end) {
551
+ const tag = reader.uint32();
552
+ switch (tag >>> 3) {
553
+ case 1: {
554
+ if (tag !== 10) {
555
+ break;
556
+ }
557
+ message.profileVisibility = reader.string();
558
+ continue;
559
+ }
560
+ case 2: {
561
+ if (tag !== 16) {
562
+ break;
563
+ }
564
+ message.showEmail = reader.bool();
565
+ continue;
566
+ }
567
+ case 3: {
568
+ if (tag !== 24) {
569
+ break;
570
+ }
571
+ message.showPhone = reader.bool();
572
+ continue;
573
+ }
574
+ case 4: {
575
+ if (tag !== 32) {
576
+ break;
577
+ }
578
+ message.allowAnalytics = reader.bool();
579
+ continue;
580
+ }
581
+ }
582
+ if ((tag & 7) === 4 || tag === 0) {
583
+ break;
584
+ }
585
+ reader.skip(tag & 7);
586
+ }
587
+ return message;
588
+ },
589
+ };
590
+ function createBaseUserAppearanceSettings() {
591
+ return { fontSize: "", compactMode: false, showAnimations: false };
592
+ }
593
+ exports.UserAppearanceSettings = {
594
+ encode(message, writer = new wire_1.BinaryWriter()) {
595
+ if (message.fontSize !== "") {
596
+ writer.uint32(10).string(message.fontSize);
597
+ }
598
+ if (message.compactMode !== false) {
599
+ writer.uint32(16).bool(message.compactMode);
600
+ }
601
+ if (message.showAnimations !== false) {
602
+ writer.uint32(24).bool(message.showAnimations);
603
+ }
604
+ return writer;
605
+ },
606
+ decode(input, length) {
607
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
608
+ const end = length === undefined ? reader.len : reader.pos + length;
609
+ const message = createBaseUserAppearanceSettings();
610
+ while (reader.pos < end) {
611
+ const tag = reader.uint32();
612
+ switch (tag >>> 3) {
613
+ case 1: {
614
+ if (tag !== 10) {
615
+ break;
616
+ }
617
+ message.fontSize = reader.string();
618
+ continue;
619
+ }
620
+ case 2: {
621
+ if (tag !== 16) {
622
+ break;
623
+ }
624
+ message.compactMode = reader.bool();
625
+ continue;
626
+ }
627
+ case 3: {
628
+ if (tag !== 24) {
629
+ break;
630
+ }
631
+ message.showAnimations = reader.bool();
632
+ continue;
633
+ }
634
+ }
635
+ if ((tag & 7) === 4 || tag === 0) {
636
+ break;
637
+ }
638
+ reader.skip(tag & 7);
639
+ }
640
+ return message;
641
+ },
642
+ };
172
643
  function createBaseUserAuthentication() {
173
644
  return { uuid: "", userId: "", passwordHash: "" };
174
645
  }
@@ -246,6 +717,9 @@ exports.User = {
246
717
  if (message.authentication !== undefined) {
247
718
  exports.UserAuthentication.encode(message.authentication, writer.uint32(26).fork()).join();
248
719
  }
720
+ if (message.settings !== undefined) {
721
+ exports.UserSettings.encode(message.settings, writer.uint32(34).fork()).join();
722
+ }
249
723
  return writer;
250
724
  },
251
725
  decode(input, length) {
@@ -276,6 +750,13 @@ exports.User = {
276
750
  message.authentication = exports.UserAuthentication.decode(reader, reader.uint32());
277
751
  continue;
278
752
  }
753
+ case 4: {
754
+ if (tag !== 34) {
755
+ break;
756
+ }
757
+ message.settings = exports.UserSettings.decode(reader, reader.uint32());
758
+ continue;
759
+ }
279
760
  }
280
761
  if ((tag & 7) === 4 || tag === 0) {
281
762
  break;
@@ -914,20 +1395,151 @@ exports.GetEmailVerificationStatusRequest = {
914
1395
  return message;
915
1396
  },
916
1397
  };
917
- function createBaseFindUsersByIdsRequest() {
918
- return { uuids: [] };
1398
+ function createBaseGetUserSettingsRequest() {
1399
+ return { userId: "" };
1400
+ }
1401
+ exports.GetUserSettingsRequest = {
1402
+ encode(message, writer = new wire_1.BinaryWriter()) {
1403
+ if (message.userId !== "") {
1404
+ writer.uint32(10).string(message.userId);
1405
+ }
1406
+ return writer;
1407
+ },
1408
+ decode(input, length) {
1409
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1410
+ const end = length === undefined ? reader.len : reader.pos + length;
1411
+ const message = createBaseGetUserSettingsRequest();
1412
+ while (reader.pos < end) {
1413
+ const tag = reader.uint32();
1414
+ switch (tag >>> 3) {
1415
+ case 1: {
1416
+ if (tag !== 10) {
1417
+ break;
1418
+ }
1419
+ message.userId = reader.string();
1420
+ continue;
1421
+ }
1422
+ }
1423
+ if ((tag & 7) === 4 || tag === 0) {
1424
+ break;
1425
+ }
1426
+ reader.skip(tag & 7);
1427
+ }
1428
+ return message;
1429
+ },
1430
+ };
1431
+ function createBaseUpdateUserSettingsRequest() {
1432
+ return { userId: "" };
1433
+ }
1434
+ exports.UpdateUserSettingsRequest = {
1435
+ encode(message, writer = new wire_1.BinaryWriter()) {
1436
+ if (message.userId !== "") {
1437
+ writer.uint32(10).string(message.userId);
1438
+ }
1439
+ if (message.theme !== undefined) {
1440
+ writer.uint32(18).string(message.theme);
1441
+ }
1442
+ if (message.language !== undefined) {
1443
+ writer.uint32(26).string(message.language);
1444
+ }
1445
+ if (message.notifications !== undefined) {
1446
+ exports.UserNotificationSettings.encode(message.notifications, writer.uint32(34).fork()).join();
1447
+ }
1448
+ if (message.privacy !== undefined) {
1449
+ exports.UserPrivacySettings.encode(message.privacy, writer.uint32(42).fork()).join();
1450
+ }
1451
+ if (message.appearance !== undefined) {
1452
+ exports.UserAppearanceSettings.encode(message.appearance, writer.uint32(50).fork()).join();
1453
+ }
1454
+ return writer;
1455
+ },
1456
+ decode(input, length) {
1457
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1458
+ const end = length === undefined ? reader.len : reader.pos + length;
1459
+ const message = createBaseUpdateUserSettingsRequest();
1460
+ while (reader.pos < end) {
1461
+ const tag = reader.uint32();
1462
+ switch (tag >>> 3) {
1463
+ case 1: {
1464
+ if (tag !== 10) {
1465
+ break;
1466
+ }
1467
+ message.userId = reader.string();
1468
+ continue;
1469
+ }
1470
+ case 2: {
1471
+ if (tag !== 18) {
1472
+ break;
1473
+ }
1474
+ message.theme = reader.string();
1475
+ continue;
1476
+ }
1477
+ case 3: {
1478
+ if (tag !== 26) {
1479
+ break;
1480
+ }
1481
+ message.language = reader.string();
1482
+ continue;
1483
+ }
1484
+ case 4: {
1485
+ if (tag !== 34) {
1486
+ break;
1487
+ }
1488
+ message.notifications = exports.UserNotificationSettings.decode(reader, reader.uint32());
1489
+ continue;
1490
+ }
1491
+ case 5: {
1492
+ if (tag !== 42) {
1493
+ break;
1494
+ }
1495
+ message.privacy = exports.UserPrivacySettings.decode(reader, reader.uint32());
1496
+ continue;
1497
+ }
1498
+ case 6: {
1499
+ if (tag !== 50) {
1500
+ break;
1501
+ }
1502
+ message.appearance = exports.UserAppearanceSettings.decode(reader, reader.uint32());
1503
+ continue;
1504
+ }
1505
+ }
1506
+ if ((tag & 7) === 4 || tag === 0) {
1507
+ break;
1508
+ }
1509
+ reader.skip(tag & 7);
1510
+ }
1511
+ return message;
1512
+ },
1513
+ };
1514
+ function createBaseCreateUserSettingsRequest() {
1515
+ return { userId: "", theme: "", language: "" };
919
1516
  }
920
- exports.FindUsersByIdsRequest = {
1517
+ exports.CreateUserSettingsRequest = {
921
1518
  encode(message, writer = new wire_1.BinaryWriter()) {
922
- for (const v of message.uuids) {
923
- writer.uint32(10).string(v);
1519
+ if (message.userId !== "") {
1520
+ writer.uint32(10).string(message.userId);
1521
+ }
1522
+ if (message.theme !== "") {
1523
+ writer.uint32(18).string(message.theme);
1524
+ }
1525
+ if (message.language !== "") {
1526
+ writer.uint32(26).string(message.language);
1527
+ }
1528
+ if (message.notifications !== undefined) {
1529
+ exports.UserNotificationSettings.encode(message.notifications, writer.uint32(34).fork()).join();
1530
+ }
1531
+ if (message.privacy !== undefined) {
1532
+ exports.UserPrivacySettings.encode(message.privacy, writer.uint32(42).fork()).join();
1533
+ }
1534
+ if (message.appearance !== undefined) {
1535
+ exports.UserAppearanceSettings.encode(message.appearance, writer.uint32(50).fork()).join();
924
1536
  }
925
1537
  return writer;
926
1538
  },
927
1539
  decode(input, length) {
928
1540
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
929
1541
  const end = length === undefined ? reader.len : reader.pos + length;
930
- const message = createBaseFindUsersByIdsRequest();
1542
+ const message = createBaseCreateUserSettingsRequest();
931
1543
  while (reader.pos < end) {
932
1544
  const tag = reader.uint32();
933
1545
  switch (tag >>> 3) {
@@ -935,7 +1547,42 @@ exports.FindUsersByIdsRequest = {
935
1547
  if (tag !== 10) {
936
1548
  break;
937
1549
  }
938
- message.uuids.push(reader.string());
1550
+ message.userId = reader.string();
1551
+ continue;
1552
+ }
1553
+ case 2: {
1554
+ if (tag !== 18) {
1555
+ break;
1556
+ }
1557
+ message.theme = reader.string();
1558
+ continue;
1559
+ }
1560
+ case 3: {
1561
+ if (tag !== 26) {
1562
+ break;
1563
+ }
1564
+ message.language = reader.string();
1565
+ continue;
1566
+ }
1567
+ case 4: {
1568
+ if (tag !== 34) {
1569
+ break;
1570
+ }
1571
+ message.notifications = exports.UserNotificationSettings.decode(reader, reader.uint32());
1572
+ continue;
1573
+ }
1574
+ case 5: {
1575
+ if (tag !== 42) {
1576
+ break;
1577
+ }
1578
+ message.privacy = exports.UserPrivacySettings.decode(reader, reader.uint32());
1579
+ continue;
1580
+ }
1581
+ case 6: {
1582
+ if (tag !== 50) {
1583
+ break;
1584
+ }
1585
+ message.appearance = exports.UserAppearanceSettings.decode(reader, reader.uint32());
939
1586
  continue;
940
1587
  }
941
1588
  }
@@ -1157,6 +1804,119 @@ exports.EmailVerificationStatusResponse = {
1157
1804
  return message;
1158
1805
  },
1159
1806
  };
1807
+ function createBaseUserSettingsResponse() {
1808
+ return { uuid: "", userId: "", theme: "", language: "", createdAt: "", updatedAt: "" };
1809
+ }
1810
+ exports.UserSettingsResponse = {
1811
+ encode(message, writer = new wire_1.BinaryWriter()) {
1812
+ if (message.uuid !== "") {
1813
+ writer.uint32(10).string(message.uuid);
1814
+ }
1815
+ if (message.userId !== "") {
1816
+ writer.uint32(18).string(message.userId);
1817
+ }
1818
+ if (message.theme !== "") {
1819
+ writer.uint32(26).string(message.theme);
1820
+ }
1821
+ if (message.language !== "") {
1822
+ writer.uint32(34).string(message.language);
1823
+ }
1824
+ if (message.notifications !== undefined) {
1825
+ exports.UserNotificationSettings.encode(message.notifications, writer.uint32(42).fork()).join();
1826
+ }
1827
+ if (message.privacy !== undefined) {
1828
+ exports.UserPrivacySettings.encode(message.privacy, writer.uint32(50).fork()).join();
1829
+ }
1830
+ if (message.appearance !== undefined) {
1831
+ exports.UserAppearanceSettings.encode(message.appearance, writer.uint32(58).fork()).join();
1832
+ }
1833
+ if (message.createdAt !== "") {
1834
+ writer.uint32(66).string(message.createdAt);
1835
+ }
1836
+ if (message.updatedAt !== "") {
1837
+ writer.uint32(74).string(message.updatedAt);
1838
+ }
1839
+ return writer;
1840
+ },
1841
+ decode(input, length) {
1842
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1843
+ const end = length === undefined ? reader.len : reader.pos + length;
1844
+ const message = createBaseUserSettingsResponse();
1845
+ while (reader.pos < end) {
1846
+ const tag = reader.uint32();
1847
+ switch (tag >>> 3) {
1848
+ case 1: {
1849
+ if (tag !== 10) {
1850
+ break;
1851
+ }
1852
+ message.uuid = reader.string();
1853
+ continue;
1854
+ }
1855
+ case 2: {
1856
+ if (tag !== 18) {
1857
+ break;
1858
+ }
1859
+ message.userId = reader.string();
1860
+ continue;
1861
+ }
1862
+ case 3: {
1863
+ if (tag !== 26) {
1864
+ break;
1865
+ }
1866
+ message.theme = reader.string();
1867
+ continue;
1868
+ }
1869
+ case 4: {
1870
+ if (tag !== 34) {
1871
+ break;
1872
+ }
1873
+ message.language = reader.string();
1874
+ continue;
1875
+ }
1876
+ case 5: {
1877
+ if (tag !== 42) {
1878
+ break;
1879
+ }
1880
+ message.notifications = exports.UserNotificationSettings.decode(reader, reader.uint32());
1881
+ continue;
1882
+ }
1883
+ case 6: {
1884
+ if (tag !== 50) {
1885
+ break;
1886
+ }
1887
+ message.privacy = exports.UserPrivacySettings.decode(reader, reader.uint32());
1888
+ continue;
1889
+ }
1890
+ case 7: {
1891
+ if (tag !== 58) {
1892
+ break;
1893
+ }
1894
+ message.appearance = exports.UserAppearanceSettings.decode(reader, reader.uint32());
1895
+ continue;
1896
+ }
1897
+ case 8: {
1898
+ if (tag !== 66) {
1899
+ break;
1900
+ }
1901
+ message.createdAt = reader.string();
1902
+ continue;
1903
+ }
1904
+ case 9: {
1905
+ if (tag !== 74) {
1906
+ break;
1907
+ }
1908
+ message.updatedAt = reader.string();
1909
+ continue;
1910
+ }
1911
+ }
1912
+ if ((tag & 7) === 4 || tag === 0) {
1913
+ break;
1914
+ }
1915
+ reader.skip(tag & 7);
1916
+ }
1917
+ return message;
1918
+ },
1919
+ };
1160
1920
  function UserServiceControllerMethods() {
1161
1921
  return function (constructor) {
1162
1922
  const grpcMethods = [
@@ -1172,7 +1932,9 @@ function UserServiceControllerMethods() {
1172
1932
  "remove",
1173
1933
  "updateEmailVerification",
1174
1934
  "getEmailVerificationStatus",
1175
- "getByIds",
1935
+ "getUserSettings",
1936
+ "updateUserSettings",
1937
+ "createUserSettings",
1176
1938
  ];
1177
1939
  for (const method of grpcMethods) {
1178
1940
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -1295,13 +2057,32 @@ exports.UserServiceService = {
1295
2057
  responseSerialize: (value) => Buffer.from(exports.EmailVerificationStatusResponse.encode(value).finish()),
1296
2058
  responseDeserialize: (value) => exports.EmailVerificationStatusResponse.decode(value),
1297
2059
  },
1298
- getByIds: {
1299
- path: "/user.UserService/getByIds",
2060
+ /** Settings methods */
2061
+ getUserSettings: {
2062
+ path: "/user.UserService/getUserSettings",
1300
2063
  requestStream: false,
1301
2064
  responseStream: false,
1302
- requestSerialize: (value) => Buffer.from(exports.FindUsersByIdsRequest.encode(value).finish()),
1303
- requestDeserialize: (value) => exports.FindUsersByIdsRequest.decode(value),
1304
- responseSerialize: (value) => Buffer.from(exports.UsersResponse.encode(value).finish()),
1305
- responseDeserialize: (value) => exports.UsersResponse.decode(value),
2065
+ requestSerialize: (value) => Buffer.from(exports.GetUserSettingsRequest.encode(value).finish()),
2066
+ requestDeserialize: (value) => exports.GetUserSettingsRequest.decode(value),
2067
+ responseSerialize: (value) => Buffer.from(exports.UserSettingsResponse.encode(value).finish()),
2068
+ responseDeserialize: (value) => exports.UserSettingsResponse.decode(value),
2069
+ },
2070
+ updateUserSettings: {
2071
+ path: "/user.UserService/updateUserSettings",
2072
+ requestStream: false,
2073
+ responseStream: false,
2074
+ requestSerialize: (value) => Buffer.from(exports.UpdateUserSettingsRequest.encode(value).finish()),
2075
+ requestDeserialize: (value) => exports.UpdateUserSettingsRequest.decode(value),
2076
+ responseSerialize: (value) => Buffer.from(exports.UserSettingsResponse.encode(value).finish()),
2077
+ responseDeserialize: (value) => exports.UserSettingsResponse.decode(value),
2078
+ },
2079
+ createUserSettings: {
2080
+ path: "/user.UserService/createUserSettings",
2081
+ requestStream: false,
2082
+ responseStream: false,
2083
+ requestSerialize: (value) => Buffer.from(exports.CreateUserSettingsRequest.encode(value).finish()),
2084
+ requestDeserialize: (value) => exports.CreateUserSettingsRequest.decode(value),
2085
+ responseSerialize: (value) => Buffer.from(exports.UserSettingsResponse.encode(value).finish()),
2086
+ responseDeserialize: (value) => exports.UserSettingsResponse.decode(value),
1306
2087
  },
1307
2088
  };