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: auth.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.AuthServiceService = exports.AUTH_SERVICE_NAME = exports.VerifyResetCodeRequest = exports.ResendConfirmationCodeRequest = exports.GetByIdRequest = exports.CheckEmailVerifiedResponse = exports.CheckEmailVerifiedRequest = exports.ConfirmEmailResponse = exports.ConfirmEmailByCodeRequest = exports.ConfirmEmailRequest = exports.RefreshTokenResponse = exports.RefreshRequest = exports.ResetPasswordRequest = exports.RecoverRequest = exports.LogoutRequest = exports.UserResponse = exports.AuthResponse = exports.Tokens = exports.LoginCredentials = exports.RegisterCredentials = exports.AUTH_PACKAGE_NAME = exports.protobufPackage = void 0;
8
+ exports.AuthServiceService = exports.AUTH_SERVICE_NAME = exports.CheckEmailVerifiedResponse = exports.ConfirmEmailResponse = exports.RefreshTokenResponse = exports.AuthResponse = exports.VerifyResetCodeRequest = exports.ResendConfirmationCodeRequest = exports.GetByIdRequest = exports.CheckEmailVerifiedRequest = exports.ConfirmEmailByCodeRequest = exports.ConfirmEmailRequest = exports.RefreshRequest = exports.ResetPasswordRequest = exports.RecoverRequest = exports.LogoutRequest = exports.LoginCredentials = exports.RegisterCredentials = exports.UserResponse = exports.Tokens = 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");
@@ -13,41 +13,84 @@ const microservices_1 = require("@nestjs/microservices");
13
13
  const empty_interface_1 = require("./google/protobuf/empty.interface");
14
14
  exports.protobufPackage = "auth";
15
15
  exports.AUTH_PACKAGE_NAME = "auth";
16
- function createBaseRegisterCredentials() {
17
- return { firstName: "", password: "" };
16
+ function createBaseTokens() {
17
+ return { accessToken: "", refreshToken: "" };
18
18
  }
19
- exports.RegisterCredentials = {
19
+ exports.Tokens = {
20
20
  encode(message, writer = new wire_1.BinaryWriter()) {
21
- if (message.firstName !== "") {
22
- writer.uint32(10).string(message.firstName);
21
+ if (message.accessToken !== "") {
22
+ writer.uint32(10).string(message.accessToken);
23
23
  }
24
- if (message.lastName !== undefined) {
25
- writer.uint32(18).string(message.lastName);
24
+ if (message.refreshToken !== "") {
25
+ writer.uint32(18).string(message.refreshToken);
26
26
  }
27
- if (message.password !== "") {
28
- writer.uint32(26).string(message.password);
27
+ return writer;
28
+ },
29
+ decode(input, length) {
30
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
31
+ const end = length === undefined ? reader.len : reader.pos + length;
32
+ const message = createBaseTokens();
33
+ while (reader.pos < end) {
34
+ const tag = reader.uint32();
35
+ switch (tag >>> 3) {
36
+ case 1: {
37
+ if (tag !== 10) {
38
+ break;
39
+ }
40
+ message.accessToken = reader.string();
41
+ continue;
42
+ }
43
+ case 2: {
44
+ if (tag !== 18) {
45
+ break;
46
+ }
47
+ message.refreshToken = reader.string();
48
+ continue;
49
+ }
50
+ }
51
+ if ((tag & 7) === 4 || tag === 0) {
52
+ break;
53
+ }
54
+ reader.skip(tag & 7);
29
55
  }
30
- if (message.photoUrl !== undefined) {
31
- writer.uint32(34).string(message.photoUrl);
56
+ return message;
57
+ },
58
+ };
59
+ function createBaseUserResponse() {
60
+ return { uuid: "", firstName: "", lastName: "", email: "", phoneNumber: "", photoUrl: "", birthday: "", gender: "" };
61
+ }
62
+ exports.UserResponse = {
63
+ encode(message, writer = new wire_1.BinaryWriter()) {
64
+ if (message.uuid !== "") {
65
+ writer.uint32(10).string(message.uuid);
32
66
  }
33
- if (message.birthday !== undefined) {
34
- writer.uint32(42).string(message.birthday);
67
+ if (message.firstName !== "") {
68
+ writer.uint32(18).string(message.firstName);
35
69
  }
36
- if (message.gender !== undefined) {
37
- writer.uint32(50).string(message.gender);
70
+ if (message.lastName !== "") {
71
+ writer.uint32(26).string(message.lastName);
38
72
  }
39
- if (message.email !== undefined) {
40
- writer.uint32(58).string(message.email);
73
+ if (message.email !== "") {
74
+ writer.uint32(34).string(message.email);
41
75
  }
42
- if (message.phoneNumber !== undefined) {
43
- writer.uint32(66).string(message.phoneNumber);
76
+ if (message.phoneNumber !== "") {
77
+ writer.uint32(42).string(message.phoneNumber);
78
+ }
79
+ if (message.photoUrl !== "") {
80
+ writer.uint32(50).string(message.photoUrl);
81
+ }
82
+ if (message.birthday !== "") {
83
+ writer.uint32(58).string(message.birthday);
84
+ }
85
+ if (message.gender !== "") {
86
+ writer.uint32(66).string(message.gender);
44
87
  }
45
88
  return writer;
46
89
  },
47
90
  decode(input, length) {
48
91
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
49
92
  const end = length === undefined ? reader.len : reader.pos + length;
50
- const message = createBaseRegisterCredentials();
93
+ const message = createBaseUserResponse();
51
94
  while (reader.pos < end) {
52
95
  const tag = reader.uint32();
53
96
  switch (tag >>> 3) {
@@ -55,56 +98,56 @@ exports.RegisterCredentials = {
55
98
  if (tag !== 10) {
56
99
  break;
57
100
  }
58
- message.firstName = reader.string();
101
+ message.uuid = reader.string();
59
102
  continue;
60
103
  }
61
104
  case 2: {
62
105
  if (tag !== 18) {
63
106
  break;
64
107
  }
65
- message.lastName = reader.string();
108
+ message.firstName = reader.string();
66
109
  continue;
67
110
  }
68
111
  case 3: {
69
112
  if (tag !== 26) {
70
113
  break;
71
114
  }
72
- message.password = reader.string();
115
+ message.lastName = reader.string();
73
116
  continue;
74
117
  }
75
118
  case 4: {
76
119
  if (tag !== 34) {
77
120
  break;
78
121
  }
79
- message.photoUrl = reader.string();
122
+ message.email = reader.string();
80
123
  continue;
81
124
  }
82
125
  case 5: {
83
126
  if (tag !== 42) {
84
127
  break;
85
128
  }
86
- message.birthday = reader.string();
129
+ message.phoneNumber = reader.string();
87
130
  continue;
88
131
  }
89
132
  case 6: {
90
133
  if (tag !== 50) {
91
134
  break;
92
135
  }
93
- message.gender = reader.string();
136
+ message.photoUrl = reader.string();
94
137
  continue;
95
138
  }
96
139
  case 7: {
97
140
  if (tag !== 58) {
98
141
  break;
99
142
  }
100
- message.email = reader.string();
143
+ message.birthday = reader.string();
101
144
  continue;
102
145
  }
103
146
  case 8: {
104
147
  if (tag !== 66) {
105
148
  break;
106
149
  }
107
- message.phoneNumber = reader.string();
150
+ message.gender = reader.string();
108
151
  continue;
109
152
  }
110
153
  }
@@ -116,29 +159,41 @@ exports.RegisterCredentials = {
116
159
  return message;
117
160
  },
118
161
  };
119
- function createBaseLoginCredentials() {
120
- return { password: "" };
162
+ function createBaseRegisterCredentials() {
163
+ return { firstName: "", password: "" };
121
164
  }
122
- exports.LoginCredentials = {
165
+ exports.RegisterCredentials = {
123
166
  encode(message, writer = new wire_1.BinaryWriter()) {
124
- if (message.email !== undefined) {
125
- writer.uint32(10).string(message.email);
167
+ if (message.firstName !== "") {
168
+ writer.uint32(10).string(message.firstName);
126
169
  }
127
- if (message.phoneNumber !== undefined) {
128
- writer.uint32(18).string(message.phoneNumber);
170
+ if (message.lastName !== undefined) {
171
+ writer.uint32(18).string(message.lastName);
129
172
  }
130
173
  if (message.password !== "") {
131
174
  writer.uint32(26).string(message.password);
132
175
  }
133
- if (message.rememberMe !== undefined) {
134
- writer.uint32(32).bool(message.rememberMe);
176
+ if (message.photoUrl !== undefined) {
177
+ writer.uint32(34).string(message.photoUrl);
178
+ }
179
+ if (message.birthday !== undefined) {
180
+ writer.uint32(42).string(message.birthday);
181
+ }
182
+ if (message.gender !== undefined) {
183
+ writer.uint32(50).string(message.gender);
184
+ }
185
+ if (message.email !== undefined) {
186
+ writer.uint32(58).string(message.email);
187
+ }
188
+ if (message.phoneNumber !== undefined) {
189
+ writer.uint32(66).string(message.phoneNumber);
135
190
  }
136
191
  return writer;
137
192
  },
138
193
  decode(input, length) {
139
194
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
140
195
  const end = length === undefined ? reader.len : reader.pos + length;
141
- const message = createBaseLoginCredentials();
196
+ const message = createBaseRegisterCredentials();
142
197
  while (reader.pos < end) {
143
198
  const tag = reader.uint32();
144
199
  switch (tag >>> 3) {
@@ -146,14 +201,14 @@ exports.LoginCredentials = {
146
201
  if (tag !== 10) {
147
202
  break;
148
203
  }
149
- message.email = reader.string();
204
+ message.firstName = reader.string();
150
205
  continue;
151
206
  }
152
207
  case 2: {
153
208
  if (tag !== 18) {
154
209
  break;
155
210
  }
156
- message.phoneNumber = reader.string();
211
+ message.lastName = reader.string();
157
212
  continue;
158
213
  }
159
214
  case 3: {
@@ -164,116 +219,38 @@ exports.LoginCredentials = {
164
219
  continue;
165
220
  }
166
221
  case 4: {
167
- if (tag !== 32) {
168
- break;
169
- }
170
- message.rememberMe = reader.bool();
171
- continue;
172
- }
173
- }
174
- if ((tag & 7) === 4 || tag === 0) {
175
- break;
176
- }
177
- reader.skip(tag & 7);
178
- }
179
- return message;
180
- },
181
- };
182
- function createBaseTokens() {
183
- return { accessToken: "", refreshToken: "" };
184
- }
185
- exports.Tokens = {
186
- encode(message, writer = new wire_1.BinaryWriter()) {
187
- if (message.accessToken !== "") {
188
- writer.uint32(10).string(message.accessToken);
189
- }
190
- if (message.refreshToken !== "") {
191
- writer.uint32(18).string(message.refreshToken);
192
- }
193
- return writer;
194
- },
195
- decode(input, length) {
196
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
197
- const end = length === undefined ? reader.len : reader.pos + length;
198
- const message = createBaseTokens();
199
- while (reader.pos < end) {
200
- const tag = reader.uint32();
201
- switch (tag >>> 3) {
202
- case 1: {
203
- if (tag !== 10) {
204
- break;
205
- }
206
- message.accessToken = reader.string();
207
- continue;
208
- }
209
- case 2: {
210
- if (tag !== 18) {
222
+ if (tag !== 34) {
211
223
  break;
212
224
  }
213
- message.refreshToken = reader.string();
225
+ message.photoUrl = reader.string();
214
226
  continue;
215
227
  }
216
- }
217
- if ((tag & 7) === 4 || tag === 0) {
218
- break;
219
- }
220
- reader.skip(tag & 7);
221
- }
222
- return message;
223
- },
224
- };
225
- function createBaseAuthResponse() {
226
- return { userId: "", sessionId: "" };
227
- }
228
- exports.AuthResponse = {
229
- encode(message, writer = new wire_1.BinaryWriter()) {
230
- if (message.userId !== "") {
231
- writer.uint32(10).string(message.userId);
232
- }
233
- if (message.sessionId !== "") {
234
- writer.uint32(18).string(message.sessionId);
235
- }
236
- if (message.tokens !== undefined) {
237
- exports.Tokens.encode(message.tokens, writer.uint32(26).fork()).join();
238
- }
239
- if (message.verificationRequired !== undefined) {
240
- writer.uint32(32).bool(message.verificationRequired);
241
- }
242
- return writer;
243
- },
244
- decode(input, length) {
245
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
246
- const end = length === undefined ? reader.len : reader.pos + length;
247
- const message = createBaseAuthResponse();
248
- while (reader.pos < end) {
249
- const tag = reader.uint32();
250
- switch (tag >>> 3) {
251
- case 1: {
252
- if (tag !== 10) {
228
+ case 5: {
229
+ if (tag !== 42) {
253
230
  break;
254
231
  }
255
- message.userId = reader.string();
232
+ message.birthday = reader.string();
256
233
  continue;
257
234
  }
258
- case 2: {
259
- if (tag !== 18) {
235
+ case 6: {
236
+ if (tag !== 50) {
260
237
  break;
261
238
  }
262
- message.sessionId = reader.string();
239
+ message.gender = reader.string();
263
240
  continue;
264
241
  }
265
- case 3: {
266
- if (tag !== 26) {
242
+ case 7: {
243
+ if (tag !== 58) {
267
244
  break;
268
245
  }
269
- message.tokens = exports.Tokens.decode(reader, reader.uint32());
246
+ message.email = reader.string();
270
247
  continue;
271
248
  }
272
- case 4: {
273
- if (tag !== 32) {
249
+ case 8: {
250
+ if (tag !== 66) {
274
251
  break;
275
252
  }
276
- message.verificationRequired = reader.bool();
253
+ message.phoneNumber = reader.string();
277
254
  continue;
278
255
  }
279
256
  }
@@ -285,41 +262,29 @@ exports.AuthResponse = {
285
262
  return message;
286
263
  },
287
264
  };
288
- function createBaseUserResponse() {
289
- return { uuid: "", firstName: "", lastName: "", email: "", phoneNumber: "", photoUrl: "", birthday: "", gender: "" };
265
+ function createBaseLoginCredentials() {
266
+ return { password: "" };
290
267
  }
291
- exports.UserResponse = {
268
+ exports.LoginCredentials = {
292
269
  encode(message, writer = new wire_1.BinaryWriter()) {
293
- if (message.uuid !== "") {
294
- writer.uint32(10).string(message.uuid);
295
- }
296
- if (message.firstName !== "") {
297
- writer.uint32(18).string(message.firstName);
298
- }
299
- if (message.lastName !== "") {
300
- writer.uint32(26).string(message.lastName);
301
- }
302
- if (message.email !== "") {
303
- writer.uint32(34).string(message.email);
304
- }
305
- if (message.phoneNumber !== "") {
306
- writer.uint32(42).string(message.phoneNumber);
307
- }
308
- if (message.photoUrl !== "") {
309
- writer.uint32(50).string(message.photoUrl);
270
+ if (message.email !== undefined) {
271
+ writer.uint32(10).string(message.email);
310
272
  }
311
- if (message.birthday !== "") {
312
- writer.uint32(58).string(message.birthday);
273
+ if (message.phoneNumber !== undefined) {
274
+ writer.uint32(18).string(message.phoneNumber);
313
275
  }
314
- if (message.gender !== "") {
315
- writer.uint32(66).string(message.gender);
276
+ if (message.password !== "") {
277
+ writer.uint32(26).string(message.password);
278
+ }
279
+ if (message.rememberMe !== undefined) {
280
+ writer.uint32(32).bool(message.rememberMe);
316
281
  }
317
282
  return writer;
318
283
  },
319
284
  decode(input, length) {
320
285
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
321
286
  const end = length === undefined ? reader.len : reader.pos + length;
322
- const message = createBaseUserResponse();
287
+ const message = createBaseLoginCredentials();
323
288
  while (reader.pos < end) {
324
289
  const tag = reader.uint32();
325
290
  switch (tag >>> 3) {
@@ -327,56 +292,28 @@ exports.UserResponse = {
327
292
  if (tag !== 10) {
328
293
  break;
329
294
  }
330
- message.uuid = reader.string();
295
+ message.email = reader.string();
331
296
  continue;
332
297
  }
333
298
  case 2: {
334
299
  if (tag !== 18) {
335
300
  break;
336
301
  }
337
- message.firstName = reader.string();
302
+ message.phoneNumber = reader.string();
338
303
  continue;
339
304
  }
340
305
  case 3: {
341
306
  if (tag !== 26) {
342
307
  break;
343
308
  }
344
- message.lastName = reader.string();
309
+ message.password = reader.string();
345
310
  continue;
346
311
  }
347
312
  case 4: {
348
- if (tag !== 34) {
349
- break;
350
- }
351
- message.email = reader.string();
352
- continue;
353
- }
354
- case 5: {
355
- if (tag !== 42) {
356
- break;
357
- }
358
- message.phoneNumber = reader.string();
359
- continue;
360
- }
361
- case 6: {
362
- if (tag !== 50) {
363
- break;
364
- }
365
- message.photoUrl = reader.string();
366
- continue;
367
- }
368
- case 7: {
369
- if (tag !== 58) {
370
- break;
371
- }
372
- message.birthday = reader.string();
373
- continue;
374
- }
375
- case 8: {
376
- if (tag !== 66) {
313
+ if (tag !== 32) {
377
314
  break;
378
315
  }
379
- message.gender = reader.string();
316
+ message.rememberMe = reader.bool();
380
317
  continue;
381
318
  }
382
319
  }
@@ -550,20 +487,20 @@ exports.RefreshRequest = {
550
487
  return message;
551
488
  },
552
489
  };
553
- function createBaseRefreshTokenResponse() {
554
- return {};
490
+ function createBaseConfirmEmailRequest() {
491
+ return { token: "" };
555
492
  }
556
- exports.RefreshTokenResponse = {
493
+ exports.ConfirmEmailRequest = {
557
494
  encode(message, writer = new wire_1.BinaryWriter()) {
558
- if (message.tokens !== undefined) {
559
- exports.Tokens.encode(message.tokens, writer.uint32(10).fork()).join();
495
+ if (message.token !== "") {
496
+ writer.uint32(10).string(message.token);
560
497
  }
561
498
  return writer;
562
499
  },
563
500
  decode(input, length) {
564
501
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
565
502
  const end = length === undefined ? reader.len : reader.pos + length;
566
- const message = createBaseRefreshTokenResponse();
503
+ const message = createBaseConfirmEmailRequest();
567
504
  while (reader.pos < end) {
568
505
  const tag = reader.uint32();
569
506
  switch (tag >>> 3) {
@@ -571,7 +508,7 @@ exports.RefreshTokenResponse = {
571
508
  if (tag !== 10) {
572
509
  break;
573
510
  }
574
- message.tokens = exports.Tokens.decode(reader, reader.uint32());
511
+ message.token = reader.string();
575
512
  continue;
576
513
  }
577
514
  }
@@ -583,20 +520,23 @@ exports.RefreshTokenResponse = {
583
520
  return message;
584
521
  },
585
522
  };
586
- function createBaseConfirmEmailRequest() {
587
- return { token: "" };
523
+ function createBaseConfirmEmailByCodeRequest() {
524
+ return { userId: "", code: "" };
588
525
  }
589
- exports.ConfirmEmailRequest = {
526
+ exports.ConfirmEmailByCodeRequest = {
590
527
  encode(message, writer = new wire_1.BinaryWriter()) {
591
- if (message.token !== "") {
592
- writer.uint32(10).string(message.token);
528
+ if (message.userId !== "") {
529
+ writer.uint32(10).string(message.userId);
530
+ }
531
+ if (message.code !== "") {
532
+ writer.uint32(18).string(message.code);
593
533
  }
594
534
  return writer;
595
535
  },
596
536
  decode(input, length) {
597
537
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
598
538
  const end = length === undefined ? reader.len : reader.pos + length;
599
- const message = createBaseConfirmEmailRequest();
539
+ const message = createBaseConfirmEmailByCodeRequest();
600
540
  while (reader.pos < end) {
601
541
  const tag = reader.uint32();
602
542
  switch (tag >>> 3) {
@@ -604,7 +544,14 @@ exports.ConfirmEmailRequest = {
604
544
  if (tag !== 10) {
605
545
  break;
606
546
  }
607
- message.token = reader.string();
547
+ message.userId = reader.string();
548
+ continue;
549
+ }
550
+ case 2: {
551
+ if (tag !== 18) {
552
+ break;
553
+ }
554
+ message.code = reader.string();
608
555
  continue;
609
556
  }
610
557
  }
@@ -616,23 +563,20 @@ exports.ConfirmEmailRequest = {
616
563
  return message;
617
564
  },
618
565
  };
619
- function createBaseConfirmEmailByCodeRequest() {
620
- return { userId: "", code: "" };
566
+ function createBaseCheckEmailVerifiedRequest() {
567
+ return { userId: "" };
621
568
  }
622
- exports.ConfirmEmailByCodeRequest = {
569
+ exports.CheckEmailVerifiedRequest = {
623
570
  encode(message, writer = new wire_1.BinaryWriter()) {
624
571
  if (message.userId !== "") {
625
572
  writer.uint32(10).string(message.userId);
626
573
  }
627
- if (message.code !== "") {
628
- writer.uint32(18).string(message.code);
629
- }
630
574
  return writer;
631
575
  },
632
576
  decode(input, length) {
633
577
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
634
578
  const end = length === undefined ? reader.len : reader.pos + length;
635
- const message = createBaseConfirmEmailByCodeRequest();
579
+ const message = createBaseCheckEmailVerifiedRequest();
636
580
  while (reader.pos < end) {
637
581
  const tag = reader.uint32();
638
582
  switch (tag >>> 3) {
@@ -643,11 +587,37 @@ exports.ConfirmEmailByCodeRequest = {
643
587
  message.userId = reader.string();
644
588
  continue;
645
589
  }
646
- case 2: {
647
- if (tag !== 18) {
590
+ }
591
+ if ((tag & 7) === 4 || tag === 0) {
592
+ break;
593
+ }
594
+ reader.skip(tag & 7);
595
+ }
596
+ return message;
597
+ },
598
+ };
599
+ function createBaseGetByIdRequest() {
600
+ return { uuid: "" };
601
+ }
602
+ exports.GetByIdRequest = {
603
+ encode(message, writer = new wire_1.BinaryWriter()) {
604
+ if (message.uuid !== "") {
605
+ writer.uint32(10).string(message.uuid);
606
+ }
607
+ return writer;
608
+ },
609
+ decode(input, length) {
610
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
611
+ const end = length === undefined ? reader.len : reader.pos + length;
612
+ const message = createBaseGetByIdRequest();
613
+ while (reader.pos < end) {
614
+ const tag = reader.uint32();
615
+ switch (tag >>> 3) {
616
+ case 1: {
617
+ if (tag !== 10) {
648
618
  break;
649
619
  }
650
- message.code = reader.string();
620
+ message.uuid = reader.string();
651
621
  continue;
652
622
  }
653
623
  }
@@ -659,23 +629,20 @@ exports.ConfirmEmailByCodeRequest = {
659
629
  return message;
660
630
  },
661
631
  };
662
- function createBaseConfirmEmailResponse() {
663
- return { userId: "", emailVerified: false };
632
+ function createBaseResendConfirmationCodeRequest() {
633
+ return { userId: "" };
664
634
  }
665
- exports.ConfirmEmailResponse = {
635
+ exports.ResendConfirmationCodeRequest = {
666
636
  encode(message, writer = new wire_1.BinaryWriter()) {
667
637
  if (message.userId !== "") {
668
638
  writer.uint32(10).string(message.userId);
669
639
  }
670
- if (message.emailVerified !== false) {
671
- writer.uint32(16).bool(message.emailVerified);
672
- }
673
640
  return writer;
674
641
  },
675
642
  decode(input, length) {
676
643
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
677
644
  const end = length === undefined ? reader.len : reader.pos + length;
678
- const message = createBaseConfirmEmailResponse();
645
+ const message = createBaseResendConfirmationCodeRequest();
679
646
  while (reader.pos < end) {
680
647
  const tag = reader.uint32();
681
648
  switch (tag >>> 3) {
@@ -686,13 +653,6 @@ exports.ConfirmEmailResponse = {
686
653
  message.userId = reader.string();
687
654
  continue;
688
655
  }
689
- case 2: {
690
- if (tag !== 16) {
691
- break;
692
- }
693
- message.emailVerified = reader.bool();
694
- continue;
695
- }
696
656
  }
697
657
  if ((tag & 7) === 4 || tag === 0) {
698
658
  break;
@@ -702,20 +662,23 @@ exports.ConfirmEmailResponse = {
702
662
  return message;
703
663
  },
704
664
  };
705
- function createBaseCheckEmailVerifiedRequest() {
706
- return { userId: "" };
665
+ function createBaseVerifyResetCodeRequest() {
666
+ return { email: "", code: "" };
707
667
  }
708
- exports.CheckEmailVerifiedRequest = {
668
+ exports.VerifyResetCodeRequest = {
709
669
  encode(message, writer = new wire_1.BinaryWriter()) {
710
- if (message.userId !== "") {
711
- writer.uint32(10).string(message.userId);
670
+ if (message.email !== "") {
671
+ writer.uint32(10).string(message.email);
672
+ }
673
+ if (message.code !== "") {
674
+ writer.uint32(18).string(message.code);
712
675
  }
713
676
  return writer;
714
677
  },
715
678
  decode(input, length) {
716
679
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
717
680
  const end = length === undefined ? reader.len : reader.pos + length;
718
- const message = createBaseCheckEmailVerifiedRequest();
681
+ const message = createBaseVerifyResetCodeRequest();
719
682
  while (reader.pos < end) {
720
683
  const tag = reader.uint32();
721
684
  switch (tag >>> 3) {
@@ -723,7 +686,14 @@ exports.CheckEmailVerifiedRequest = {
723
686
  if (tag !== 10) {
724
687
  break;
725
688
  }
726
- message.userId = reader.string();
689
+ message.email = reader.string();
690
+ continue;
691
+ }
692
+ case 2: {
693
+ if (tag !== 18) {
694
+ break;
695
+ }
696
+ message.code = reader.string();
727
697
  continue;
728
698
  }
729
699
  }
@@ -735,23 +705,29 @@ exports.CheckEmailVerifiedRequest = {
735
705
  return message;
736
706
  },
737
707
  };
738
- function createBaseCheckEmailVerifiedResponse() {
739
- return { userId: "", emailVerified: false };
708
+ function createBaseAuthResponse() {
709
+ return { userId: "", sessionId: "" };
740
710
  }
741
- exports.CheckEmailVerifiedResponse = {
711
+ exports.AuthResponse = {
742
712
  encode(message, writer = new wire_1.BinaryWriter()) {
743
713
  if (message.userId !== "") {
744
714
  writer.uint32(10).string(message.userId);
745
715
  }
746
- if (message.emailVerified !== false) {
747
- writer.uint32(16).bool(message.emailVerified);
716
+ if (message.sessionId !== "") {
717
+ writer.uint32(18).string(message.sessionId);
718
+ }
719
+ if (message.tokens !== undefined) {
720
+ exports.Tokens.encode(message.tokens, writer.uint32(26).fork()).join();
721
+ }
722
+ if (message.verificationRequired !== undefined) {
723
+ writer.uint32(32).bool(message.verificationRequired);
748
724
  }
749
725
  return writer;
750
726
  },
751
727
  decode(input, length) {
752
728
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
753
729
  const end = length === undefined ? reader.len : reader.pos + length;
754
- const message = createBaseCheckEmailVerifiedResponse();
730
+ const message = createBaseAuthResponse();
755
731
  while (reader.pos < end) {
756
732
  const tag = reader.uint32();
757
733
  switch (tag >>> 3) {
@@ -763,10 +739,24 @@ exports.CheckEmailVerifiedResponse = {
763
739
  continue;
764
740
  }
765
741
  case 2: {
766
- if (tag !== 16) {
742
+ if (tag !== 18) {
767
743
  break;
768
744
  }
769
- message.emailVerified = reader.bool();
745
+ message.sessionId = reader.string();
746
+ continue;
747
+ }
748
+ case 3: {
749
+ if (tag !== 26) {
750
+ break;
751
+ }
752
+ message.tokens = exports.Tokens.decode(reader, reader.uint32());
753
+ continue;
754
+ }
755
+ case 4: {
756
+ if (tag !== 32) {
757
+ break;
758
+ }
759
+ message.verificationRequired = reader.bool();
770
760
  continue;
771
761
  }
772
762
  }
@@ -778,20 +768,20 @@ exports.CheckEmailVerifiedResponse = {
778
768
  return message;
779
769
  },
780
770
  };
781
- function createBaseGetByIdRequest() {
782
- return { uuid: "" };
771
+ function createBaseRefreshTokenResponse() {
772
+ return {};
783
773
  }
784
- exports.GetByIdRequest = {
774
+ exports.RefreshTokenResponse = {
785
775
  encode(message, writer = new wire_1.BinaryWriter()) {
786
- if (message.uuid !== "") {
787
- writer.uint32(10).string(message.uuid);
776
+ if (message.tokens !== undefined) {
777
+ exports.Tokens.encode(message.tokens, writer.uint32(10).fork()).join();
788
778
  }
789
779
  return writer;
790
780
  },
791
781
  decode(input, length) {
792
782
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
793
783
  const end = length === undefined ? reader.len : reader.pos + length;
794
- const message = createBaseGetByIdRequest();
784
+ const message = createBaseRefreshTokenResponse();
795
785
  while (reader.pos < end) {
796
786
  const tag = reader.uint32();
797
787
  switch (tag >>> 3) {
@@ -799,7 +789,7 @@ exports.GetByIdRequest = {
799
789
  if (tag !== 10) {
800
790
  break;
801
791
  }
802
- message.uuid = reader.string();
792
+ message.tokens = exports.Tokens.decode(reader, reader.uint32());
803
793
  continue;
804
794
  }
805
795
  }
@@ -811,20 +801,23 @@ exports.GetByIdRequest = {
811
801
  return message;
812
802
  },
813
803
  };
814
- function createBaseResendConfirmationCodeRequest() {
815
- return { userId: "" };
804
+ function createBaseConfirmEmailResponse() {
805
+ return { userId: "", emailVerified: false };
816
806
  }
817
- exports.ResendConfirmationCodeRequest = {
807
+ exports.ConfirmEmailResponse = {
818
808
  encode(message, writer = new wire_1.BinaryWriter()) {
819
809
  if (message.userId !== "") {
820
810
  writer.uint32(10).string(message.userId);
821
811
  }
812
+ if (message.emailVerified !== false) {
813
+ writer.uint32(16).bool(message.emailVerified);
814
+ }
822
815
  return writer;
823
816
  },
824
817
  decode(input, length) {
825
818
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
826
819
  const end = length === undefined ? reader.len : reader.pos + length;
827
- const message = createBaseResendConfirmationCodeRequest();
820
+ const message = createBaseConfirmEmailResponse();
828
821
  while (reader.pos < end) {
829
822
  const tag = reader.uint32();
830
823
  switch (tag >>> 3) {
@@ -835,6 +828,13 @@ exports.ResendConfirmationCodeRequest = {
835
828
  message.userId = reader.string();
836
829
  continue;
837
830
  }
831
+ case 2: {
832
+ if (tag !== 16) {
833
+ break;
834
+ }
835
+ message.emailVerified = reader.bool();
836
+ continue;
837
+ }
838
838
  }
839
839
  if ((tag & 7) === 4 || tag === 0) {
840
840
  break;
@@ -844,23 +844,23 @@ exports.ResendConfirmationCodeRequest = {
844
844
  return message;
845
845
  },
846
846
  };
847
- function createBaseVerifyResetCodeRequest() {
848
- return { email: "", code: "" };
847
+ function createBaseCheckEmailVerifiedResponse() {
848
+ return { userId: "", emailVerified: false };
849
849
  }
850
- exports.VerifyResetCodeRequest = {
850
+ exports.CheckEmailVerifiedResponse = {
851
851
  encode(message, writer = new wire_1.BinaryWriter()) {
852
- if (message.email !== "") {
853
- writer.uint32(10).string(message.email);
852
+ if (message.userId !== "") {
853
+ writer.uint32(10).string(message.userId);
854
854
  }
855
- if (message.code !== "") {
856
- writer.uint32(18).string(message.code);
855
+ if (message.emailVerified !== false) {
856
+ writer.uint32(16).bool(message.emailVerified);
857
857
  }
858
858
  return writer;
859
859
  },
860
860
  decode(input, length) {
861
861
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
862
862
  const end = length === undefined ? reader.len : reader.pos + length;
863
- const message = createBaseVerifyResetCodeRequest();
863
+ const message = createBaseCheckEmailVerifiedResponse();
864
864
  while (reader.pos < end) {
865
865
  const tag = reader.uint32();
866
866
  switch (tag >>> 3) {
@@ -868,14 +868,14 @@ exports.VerifyResetCodeRequest = {
868
868
  if (tag !== 10) {
869
869
  break;
870
870
  }
871
- message.email = reader.string();
871
+ message.userId = reader.string();
872
872
  continue;
873
873
  }
874
874
  case 2: {
875
- if (tag !== 18) {
875
+ if (tag !== 16) {
876
876
  break;
877
877
  }
878
- message.code = reader.string();
878
+ message.emailVerified = reader.bool();
879
879
  continue;
880
880
  }
881
881
  }