naijarea-ts 1.0.2

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.
@@ -0,0 +1,2211 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.10.0
5
+ // protoc v6.33.2
6
+ // source: account.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.AccountServiceDefinition = exports.Representative = exports.OnboardingProgress = exports.AccountStatus = exports.Account = exports.ApplyForRepresentativeResponse = exports.ApplyForRepresentativeRequest = exports.OnboardResponse = exports.OnboardRequest = exports.UploadPhotoResponse = exports.UploadPhotoRequest = exports.UpdatePasswordRequest = exports.UpdateProfileResponse = exports.UpdateProfileRequest = exports.GetProfileResponse = exports.GetProfileRequest = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ const wire_1 = require("@bufbuild/protobuf/wire");
11
+ const common_1 = require("./common");
12
+ exports.protobufPackage = "pb";
13
+ function createBaseGetProfileRequest() {
14
+ return { accountId: "" };
15
+ }
16
+ exports.GetProfileRequest = {
17
+ encode(message, writer = new wire_1.BinaryWriter()) {
18
+ if (message.accountId !== "") {
19
+ writer.uint32(10).string(message.accountId);
20
+ }
21
+ return writer;
22
+ },
23
+ decode(input, length) {
24
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
25
+ const end = length === undefined ? reader.len : reader.pos + length;
26
+ const message = createBaseGetProfileRequest();
27
+ while (reader.pos < end) {
28
+ const tag = reader.uint32();
29
+ switch (tag >>> 3) {
30
+ case 1: {
31
+ if (tag !== 10) {
32
+ break;
33
+ }
34
+ message.accountId = reader.string();
35
+ continue;
36
+ }
37
+ }
38
+ if ((tag & 7) === 4 || tag === 0) {
39
+ break;
40
+ }
41
+ reader.skip(tag & 7);
42
+ }
43
+ return message;
44
+ },
45
+ fromJSON(object) {
46
+ return { accountId: isSet(object.accountId) ? globalThis.String(object.accountId) : "" };
47
+ },
48
+ toJSON(message) {
49
+ const obj = {};
50
+ if (message.accountId !== "") {
51
+ obj.accountId = message.accountId;
52
+ }
53
+ return obj;
54
+ },
55
+ create(base) {
56
+ return exports.GetProfileRequest.fromPartial(base !== null && base !== void 0 ? base : {});
57
+ },
58
+ fromPartial(object) {
59
+ var _a;
60
+ const message = createBaseGetProfileRequest();
61
+ message.accountId = (_a = object.accountId) !== null && _a !== void 0 ? _a : "";
62
+ return message;
63
+ },
64
+ };
65
+ function createBaseGetProfileResponse() {
66
+ return { account: undefined };
67
+ }
68
+ exports.GetProfileResponse = {
69
+ encode(message, writer = new wire_1.BinaryWriter()) {
70
+ if (message.account !== undefined) {
71
+ exports.Account.encode(message.account, writer.uint32(10).fork()).join();
72
+ }
73
+ return writer;
74
+ },
75
+ decode(input, length) {
76
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
77
+ const end = length === undefined ? reader.len : reader.pos + length;
78
+ const message = createBaseGetProfileResponse();
79
+ while (reader.pos < end) {
80
+ const tag = reader.uint32();
81
+ switch (tag >>> 3) {
82
+ case 1: {
83
+ if (tag !== 10) {
84
+ break;
85
+ }
86
+ message.account = exports.Account.decode(reader, reader.uint32());
87
+ continue;
88
+ }
89
+ }
90
+ if ((tag & 7) === 4 || tag === 0) {
91
+ break;
92
+ }
93
+ reader.skip(tag & 7);
94
+ }
95
+ return message;
96
+ },
97
+ fromJSON(object) {
98
+ return { account: isSet(object.account) ? exports.Account.fromJSON(object.account) : undefined };
99
+ },
100
+ toJSON(message) {
101
+ const obj = {};
102
+ if (message.account !== undefined) {
103
+ obj.account = exports.Account.toJSON(message.account);
104
+ }
105
+ return obj;
106
+ },
107
+ create(base) {
108
+ return exports.GetProfileResponse.fromPartial(base !== null && base !== void 0 ? base : {});
109
+ },
110
+ fromPartial(object) {
111
+ const message = createBaseGetProfileResponse();
112
+ message.account = (object.account !== undefined && object.account !== null)
113
+ ? exports.Account.fromPartial(object.account)
114
+ : undefined;
115
+ return message;
116
+ },
117
+ };
118
+ function createBaseUpdateProfileRequest() {
119
+ return {
120
+ name: "",
121
+ phoneNumber: "",
122
+ gender: "",
123
+ dob: "",
124
+ location: "",
125
+ stateId: "",
126
+ localGovernmentId: "",
127
+ pollingUnit: "",
128
+ };
129
+ }
130
+ exports.UpdateProfileRequest = {
131
+ encode(message, writer = new wire_1.BinaryWriter()) {
132
+ if (message.name !== "") {
133
+ writer.uint32(10).string(message.name);
134
+ }
135
+ if (message.phoneNumber !== "") {
136
+ writer.uint32(18).string(message.phoneNumber);
137
+ }
138
+ if (message.gender !== "") {
139
+ writer.uint32(26).string(message.gender);
140
+ }
141
+ if (message.dob !== "") {
142
+ writer.uint32(34).string(message.dob);
143
+ }
144
+ if (message.location !== "") {
145
+ writer.uint32(42).string(message.location);
146
+ }
147
+ if (message.stateId !== "") {
148
+ writer.uint32(50).string(message.stateId);
149
+ }
150
+ if (message.localGovernmentId !== "") {
151
+ writer.uint32(58).string(message.localGovernmentId);
152
+ }
153
+ if (message.pollingUnit !== "") {
154
+ writer.uint32(66).string(message.pollingUnit);
155
+ }
156
+ return writer;
157
+ },
158
+ decode(input, length) {
159
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
160
+ const end = length === undefined ? reader.len : reader.pos + length;
161
+ const message = createBaseUpdateProfileRequest();
162
+ while (reader.pos < end) {
163
+ const tag = reader.uint32();
164
+ switch (tag >>> 3) {
165
+ case 1: {
166
+ if (tag !== 10) {
167
+ break;
168
+ }
169
+ message.name = reader.string();
170
+ continue;
171
+ }
172
+ case 2: {
173
+ if (tag !== 18) {
174
+ break;
175
+ }
176
+ message.phoneNumber = reader.string();
177
+ continue;
178
+ }
179
+ case 3: {
180
+ if (tag !== 26) {
181
+ break;
182
+ }
183
+ message.gender = reader.string();
184
+ continue;
185
+ }
186
+ case 4: {
187
+ if (tag !== 34) {
188
+ break;
189
+ }
190
+ message.dob = reader.string();
191
+ continue;
192
+ }
193
+ case 5: {
194
+ if (tag !== 42) {
195
+ break;
196
+ }
197
+ message.location = reader.string();
198
+ continue;
199
+ }
200
+ case 6: {
201
+ if (tag !== 50) {
202
+ break;
203
+ }
204
+ message.stateId = reader.string();
205
+ continue;
206
+ }
207
+ case 7: {
208
+ if (tag !== 58) {
209
+ break;
210
+ }
211
+ message.localGovernmentId = reader.string();
212
+ continue;
213
+ }
214
+ case 8: {
215
+ if (tag !== 66) {
216
+ break;
217
+ }
218
+ message.pollingUnit = reader.string();
219
+ continue;
220
+ }
221
+ }
222
+ if ((tag & 7) === 4 || tag === 0) {
223
+ break;
224
+ }
225
+ reader.skip(tag & 7);
226
+ }
227
+ return message;
228
+ },
229
+ fromJSON(object) {
230
+ return {
231
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
232
+ phoneNumber: isSet(object.phoneNumber) ? globalThis.String(object.phoneNumber) : "",
233
+ gender: isSet(object.gender) ? globalThis.String(object.gender) : "",
234
+ dob: isSet(object.dob) ? globalThis.String(object.dob) : "",
235
+ location: isSet(object.location) ? globalThis.String(object.location) : "",
236
+ stateId: isSet(object.stateId) ? globalThis.String(object.stateId) : "",
237
+ localGovernmentId: isSet(object.localGovernmentId) ? globalThis.String(object.localGovernmentId) : "",
238
+ pollingUnit: isSet(object.pollingUnit) ? globalThis.String(object.pollingUnit) : "",
239
+ };
240
+ },
241
+ toJSON(message) {
242
+ const obj = {};
243
+ if (message.name !== "") {
244
+ obj.name = message.name;
245
+ }
246
+ if (message.phoneNumber !== "") {
247
+ obj.phoneNumber = message.phoneNumber;
248
+ }
249
+ if (message.gender !== "") {
250
+ obj.gender = message.gender;
251
+ }
252
+ if (message.dob !== "") {
253
+ obj.dob = message.dob;
254
+ }
255
+ if (message.location !== "") {
256
+ obj.location = message.location;
257
+ }
258
+ if (message.stateId !== "") {
259
+ obj.stateId = message.stateId;
260
+ }
261
+ if (message.localGovernmentId !== "") {
262
+ obj.localGovernmentId = message.localGovernmentId;
263
+ }
264
+ if (message.pollingUnit !== "") {
265
+ obj.pollingUnit = message.pollingUnit;
266
+ }
267
+ return obj;
268
+ },
269
+ create(base) {
270
+ return exports.UpdateProfileRequest.fromPartial(base !== null && base !== void 0 ? base : {});
271
+ },
272
+ fromPartial(object) {
273
+ var _a, _b, _c, _d, _e, _f, _g, _h;
274
+ const message = createBaseUpdateProfileRequest();
275
+ message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
276
+ message.phoneNumber = (_b = object.phoneNumber) !== null && _b !== void 0 ? _b : "";
277
+ message.gender = (_c = object.gender) !== null && _c !== void 0 ? _c : "";
278
+ message.dob = (_d = object.dob) !== null && _d !== void 0 ? _d : "";
279
+ message.location = (_e = object.location) !== null && _e !== void 0 ? _e : "";
280
+ message.stateId = (_f = object.stateId) !== null && _f !== void 0 ? _f : "";
281
+ message.localGovernmentId = (_g = object.localGovernmentId) !== null && _g !== void 0 ? _g : "";
282
+ message.pollingUnit = (_h = object.pollingUnit) !== null && _h !== void 0 ? _h : "";
283
+ return message;
284
+ },
285
+ };
286
+ function createBaseUpdateProfileResponse() {
287
+ return { account: undefined };
288
+ }
289
+ exports.UpdateProfileResponse = {
290
+ encode(message, writer = new wire_1.BinaryWriter()) {
291
+ if (message.account !== undefined) {
292
+ exports.Account.encode(message.account, writer.uint32(10).fork()).join();
293
+ }
294
+ return writer;
295
+ },
296
+ decode(input, length) {
297
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
298
+ const end = length === undefined ? reader.len : reader.pos + length;
299
+ const message = createBaseUpdateProfileResponse();
300
+ while (reader.pos < end) {
301
+ const tag = reader.uint32();
302
+ switch (tag >>> 3) {
303
+ case 1: {
304
+ if (tag !== 10) {
305
+ break;
306
+ }
307
+ message.account = exports.Account.decode(reader, reader.uint32());
308
+ continue;
309
+ }
310
+ }
311
+ if ((tag & 7) === 4 || tag === 0) {
312
+ break;
313
+ }
314
+ reader.skip(tag & 7);
315
+ }
316
+ return message;
317
+ },
318
+ fromJSON(object) {
319
+ return { account: isSet(object.account) ? exports.Account.fromJSON(object.account) : undefined };
320
+ },
321
+ toJSON(message) {
322
+ const obj = {};
323
+ if (message.account !== undefined) {
324
+ obj.account = exports.Account.toJSON(message.account);
325
+ }
326
+ return obj;
327
+ },
328
+ create(base) {
329
+ return exports.UpdateProfileResponse.fromPartial(base !== null && base !== void 0 ? base : {});
330
+ },
331
+ fromPartial(object) {
332
+ const message = createBaseUpdateProfileResponse();
333
+ message.account = (object.account !== undefined && object.account !== null)
334
+ ? exports.Account.fromPartial(object.account)
335
+ : undefined;
336
+ return message;
337
+ },
338
+ };
339
+ function createBaseUpdatePasswordRequest() {
340
+ return { oldPassword: "", newPassword: "", confirmPassword: "" };
341
+ }
342
+ exports.UpdatePasswordRequest = {
343
+ encode(message, writer = new wire_1.BinaryWriter()) {
344
+ if (message.oldPassword !== "") {
345
+ writer.uint32(10).string(message.oldPassword);
346
+ }
347
+ if (message.newPassword !== "") {
348
+ writer.uint32(18).string(message.newPassword);
349
+ }
350
+ if (message.confirmPassword !== "") {
351
+ writer.uint32(26).string(message.confirmPassword);
352
+ }
353
+ return writer;
354
+ },
355
+ decode(input, length) {
356
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
357
+ const end = length === undefined ? reader.len : reader.pos + length;
358
+ const message = createBaseUpdatePasswordRequest();
359
+ while (reader.pos < end) {
360
+ const tag = reader.uint32();
361
+ switch (tag >>> 3) {
362
+ case 1: {
363
+ if (tag !== 10) {
364
+ break;
365
+ }
366
+ message.oldPassword = reader.string();
367
+ continue;
368
+ }
369
+ case 2: {
370
+ if (tag !== 18) {
371
+ break;
372
+ }
373
+ message.newPassword = reader.string();
374
+ continue;
375
+ }
376
+ case 3: {
377
+ if (tag !== 26) {
378
+ break;
379
+ }
380
+ message.confirmPassword = reader.string();
381
+ continue;
382
+ }
383
+ }
384
+ if ((tag & 7) === 4 || tag === 0) {
385
+ break;
386
+ }
387
+ reader.skip(tag & 7);
388
+ }
389
+ return message;
390
+ },
391
+ fromJSON(object) {
392
+ return {
393
+ oldPassword: isSet(object.oldPassword) ? globalThis.String(object.oldPassword) : "",
394
+ newPassword: isSet(object.newPassword) ? globalThis.String(object.newPassword) : "",
395
+ confirmPassword: isSet(object.confirmPassword) ? globalThis.String(object.confirmPassword) : "",
396
+ };
397
+ },
398
+ toJSON(message) {
399
+ const obj = {};
400
+ if (message.oldPassword !== "") {
401
+ obj.oldPassword = message.oldPassword;
402
+ }
403
+ if (message.newPassword !== "") {
404
+ obj.newPassword = message.newPassword;
405
+ }
406
+ if (message.confirmPassword !== "") {
407
+ obj.confirmPassword = message.confirmPassword;
408
+ }
409
+ return obj;
410
+ },
411
+ create(base) {
412
+ return exports.UpdatePasswordRequest.fromPartial(base !== null && base !== void 0 ? base : {});
413
+ },
414
+ fromPartial(object) {
415
+ var _a, _b, _c;
416
+ const message = createBaseUpdatePasswordRequest();
417
+ message.oldPassword = (_a = object.oldPassword) !== null && _a !== void 0 ? _a : "";
418
+ message.newPassword = (_b = object.newPassword) !== null && _b !== void 0 ? _b : "";
419
+ message.confirmPassword = (_c = object.confirmPassword) !== null && _c !== void 0 ? _c : "";
420
+ return message;
421
+ },
422
+ };
423
+ function createBaseUploadPhotoRequest() {
424
+ return { type: "", photoData: new Uint8Array(0), contentType: "" };
425
+ }
426
+ exports.UploadPhotoRequest = {
427
+ encode(message, writer = new wire_1.BinaryWriter()) {
428
+ if (message.type !== "") {
429
+ writer.uint32(10).string(message.type);
430
+ }
431
+ if (message.photoData.length !== 0) {
432
+ writer.uint32(18).bytes(message.photoData);
433
+ }
434
+ if (message.contentType !== "") {
435
+ writer.uint32(26).string(message.contentType);
436
+ }
437
+ return writer;
438
+ },
439
+ decode(input, length) {
440
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
441
+ const end = length === undefined ? reader.len : reader.pos + length;
442
+ const message = createBaseUploadPhotoRequest();
443
+ while (reader.pos < end) {
444
+ const tag = reader.uint32();
445
+ switch (tag >>> 3) {
446
+ case 1: {
447
+ if (tag !== 10) {
448
+ break;
449
+ }
450
+ message.type = reader.string();
451
+ continue;
452
+ }
453
+ case 2: {
454
+ if (tag !== 18) {
455
+ break;
456
+ }
457
+ message.photoData = reader.bytes();
458
+ continue;
459
+ }
460
+ case 3: {
461
+ if (tag !== 26) {
462
+ break;
463
+ }
464
+ message.contentType = reader.string();
465
+ continue;
466
+ }
467
+ }
468
+ if ((tag & 7) === 4 || tag === 0) {
469
+ break;
470
+ }
471
+ reader.skip(tag & 7);
472
+ }
473
+ return message;
474
+ },
475
+ fromJSON(object) {
476
+ return {
477
+ type: isSet(object.type) ? globalThis.String(object.type) : "",
478
+ photoData: isSet(object.photoData) ? bytesFromBase64(object.photoData) : new Uint8Array(0),
479
+ contentType: isSet(object.contentType) ? globalThis.String(object.contentType) : "",
480
+ };
481
+ },
482
+ toJSON(message) {
483
+ const obj = {};
484
+ if (message.type !== "") {
485
+ obj.type = message.type;
486
+ }
487
+ if (message.photoData.length !== 0) {
488
+ obj.photoData = base64FromBytes(message.photoData);
489
+ }
490
+ if (message.contentType !== "") {
491
+ obj.contentType = message.contentType;
492
+ }
493
+ return obj;
494
+ },
495
+ create(base) {
496
+ return exports.UploadPhotoRequest.fromPartial(base !== null && base !== void 0 ? base : {});
497
+ },
498
+ fromPartial(object) {
499
+ var _a, _b, _c;
500
+ const message = createBaseUploadPhotoRequest();
501
+ message.type = (_a = object.type) !== null && _a !== void 0 ? _a : "";
502
+ message.photoData = (_b = object.photoData) !== null && _b !== void 0 ? _b : new Uint8Array(0);
503
+ message.contentType = (_c = object.contentType) !== null && _c !== void 0 ? _c : "";
504
+ return message;
505
+ },
506
+ };
507
+ function createBaseUploadPhotoResponse() {
508
+ return { photoUrl: "" };
509
+ }
510
+ exports.UploadPhotoResponse = {
511
+ encode(message, writer = new wire_1.BinaryWriter()) {
512
+ if (message.photoUrl !== "") {
513
+ writer.uint32(10).string(message.photoUrl);
514
+ }
515
+ return writer;
516
+ },
517
+ decode(input, length) {
518
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
519
+ const end = length === undefined ? reader.len : reader.pos + length;
520
+ const message = createBaseUploadPhotoResponse();
521
+ while (reader.pos < end) {
522
+ const tag = reader.uint32();
523
+ switch (tag >>> 3) {
524
+ case 1: {
525
+ if (tag !== 10) {
526
+ break;
527
+ }
528
+ message.photoUrl = reader.string();
529
+ continue;
530
+ }
531
+ }
532
+ if ((tag & 7) === 4 || tag === 0) {
533
+ break;
534
+ }
535
+ reader.skip(tag & 7);
536
+ }
537
+ return message;
538
+ },
539
+ fromJSON(object) {
540
+ return { photoUrl: isSet(object.photoUrl) ? globalThis.String(object.photoUrl) : "" };
541
+ },
542
+ toJSON(message) {
543
+ const obj = {};
544
+ if (message.photoUrl !== "") {
545
+ obj.photoUrl = message.photoUrl;
546
+ }
547
+ return obj;
548
+ },
549
+ create(base) {
550
+ return exports.UploadPhotoResponse.fromPartial(base !== null && base !== void 0 ? base : {});
551
+ },
552
+ fromPartial(object) {
553
+ var _a;
554
+ const message = createBaseUploadPhotoResponse();
555
+ message.photoUrl = (_a = object.photoUrl) !== null && _a !== void 0 ? _a : "";
556
+ return message;
557
+ },
558
+ };
559
+ function createBaseOnboardRequest() {
560
+ return {
561
+ name: "",
562
+ phoneNumber: "",
563
+ gender: "",
564
+ dob: "",
565
+ location: "",
566
+ stateId: "",
567
+ localGovernmentId: "",
568
+ pollingUnit: "",
569
+ kycData: new Uint8Array(0),
570
+ };
571
+ }
572
+ exports.OnboardRequest = {
573
+ encode(message, writer = new wire_1.BinaryWriter()) {
574
+ if (message.name !== "") {
575
+ writer.uint32(10).string(message.name);
576
+ }
577
+ if (message.phoneNumber !== "") {
578
+ writer.uint32(18).string(message.phoneNumber);
579
+ }
580
+ if (message.gender !== "") {
581
+ writer.uint32(26).string(message.gender);
582
+ }
583
+ if (message.dob !== "") {
584
+ writer.uint32(34).string(message.dob);
585
+ }
586
+ if (message.location !== "") {
587
+ writer.uint32(42).string(message.location);
588
+ }
589
+ if (message.stateId !== "") {
590
+ writer.uint32(50).string(message.stateId);
591
+ }
592
+ if (message.localGovernmentId !== "") {
593
+ writer.uint32(58).string(message.localGovernmentId);
594
+ }
595
+ if (message.pollingUnit !== "") {
596
+ writer.uint32(66).string(message.pollingUnit);
597
+ }
598
+ if (message.kycData.length !== 0) {
599
+ writer.uint32(74).bytes(message.kycData);
600
+ }
601
+ return writer;
602
+ },
603
+ decode(input, length) {
604
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
605
+ const end = length === undefined ? reader.len : reader.pos + length;
606
+ const message = createBaseOnboardRequest();
607
+ while (reader.pos < end) {
608
+ const tag = reader.uint32();
609
+ switch (tag >>> 3) {
610
+ case 1: {
611
+ if (tag !== 10) {
612
+ break;
613
+ }
614
+ message.name = reader.string();
615
+ continue;
616
+ }
617
+ case 2: {
618
+ if (tag !== 18) {
619
+ break;
620
+ }
621
+ message.phoneNumber = reader.string();
622
+ continue;
623
+ }
624
+ case 3: {
625
+ if (tag !== 26) {
626
+ break;
627
+ }
628
+ message.gender = reader.string();
629
+ continue;
630
+ }
631
+ case 4: {
632
+ if (tag !== 34) {
633
+ break;
634
+ }
635
+ message.dob = reader.string();
636
+ continue;
637
+ }
638
+ case 5: {
639
+ if (tag !== 42) {
640
+ break;
641
+ }
642
+ message.location = reader.string();
643
+ continue;
644
+ }
645
+ case 6: {
646
+ if (tag !== 50) {
647
+ break;
648
+ }
649
+ message.stateId = reader.string();
650
+ continue;
651
+ }
652
+ case 7: {
653
+ if (tag !== 58) {
654
+ break;
655
+ }
656
+ message.localGovernmentId = reader.string();
657
+ continue;
658
+ }
659
+ case 8: {
660
+ if (tag !== 66) {
661
+ break;
662
+ }
663
+ message.pollingUnit = reader.string();
664
+ continue;
665
+ }
666
+ case 9: {
667
+ if (tag !== 74) {
668
+ break;
669
+ }
670
+ message.kycData = reader.bytes();
671
+ continue;
672
+ }
673
+ }
674
+ if ((tag & 7) === 4 || tag === 0) {
675
+ break;
676
+ }
677
+ reader.skip(tag & 7);
678
+ }
679
+ return message;
680
+ },
681
+ fromJSON(object) {
682
+ return {
683
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
684
+ phoneNumber: isSet(object.phoneNumber) ? globalThis.String(object.phoneNumber) : "",
685
+ gender: isSet(object.gender) ? globalThis.String(object.gender) : "",
686
+ dob: isSet(object.dob) ? globalThis.String(object.dob) : "",
687
+ location: isSet(object.location) ? globalThis.String(object.location) : "",
688
+ stateId: isSet(object.stateId) ? globalThis.String(object.stateId) : "",
689
+ localGovernmentId: isSet(object.localGovernmentId) ? globalThis.String(object.localGovernmentId) : "",
690
+ pollingUnit: isSet(object.pollingUnit) ? globalThis.String(object.pollingUnit) : "",
691
+ kycData: isSet(object.kycData) ? bytesFromBase64(object.kycData) : new Uint8Array(0),
692
+ };
693
+ },
694
+ toJSON(message) {
695
+ const obj = {};
696
+ if (message.name !== "") {
697
+ obj.name = message.name;
698
+ }
699
+ if (message.phoneNumber !== "") {
700
+ obj.phoneNumber = message.phoneNumber;
701
+ }
702
+ if (message.gender !== "") {
703
+ obj.gender = message.gender;
704
+ }
705
+ if (message.dob !== "") {
706
+ obj.dob = message.dob;
707
+ }
708
+ if (message.location !== "") {
709
+ obj.location = message.location;
710
+ }
711
+ if (message.stateId !== "") {
712
+ obj.stateId = message.stateId;
713
+ }
714
+ if (message.localGovernmentId !== "") {
715
+ obj.localGovernmentId = message.localGovernmentId;
716
+ }
717
+ if (message.pollingUnit !== "") {
718
+ obj.pollingUnit = message.pollingUnit;
719
+ }
720
+ if (message.kycData.length !== 0) {
721
+ obj.kycData = base64FromBytes(message.kycData);
722
+ }
723
+ return obj;
724
+ },
725
+ create(base) {
726
+ return exports.OnboardRequest.fromPartial(base !== null && base !== void 0 ? base : {});
727
+ },
728
+ fromPartial(object) {
729
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
730
+ const message = createBaseOnboardRequest();
731
+ message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
732
+ message.phoneNumber = (_b = object.phoneNumber) !== null && _b !== void 0 ? _b : "";
733
+ message.gender = (_c = object.gender) !== null && _c !== void 0 ? _c : "";
734
+ message.dob = (_d = object.dob) !== null && _d !== void 0 ? _d : "";
735
+ message.location = (_e = object.location) !== null && _e !== void 0 ? _e : "";
736
+ message.stateId = (_f = object.stateId) !== null && _f !== void 0 ? _f : "";
737
+ message.localGovernmentId = (_g = object.localGovernmentId) !== null && _g !== void 0 ? _g : "";
738
+ message.pollingUnit = (_h = object.pollingUnit) !== null && _h !== void 0 ? _h : "";
739
+ message.kycData = (_j = object.kycData) !== null && _j !== void 0 ? _j : new Uint8Array(0);
740
+ return message;
741
+ },
742
+ };
743
+ function createBaseOnboardResponse() {
744
+ return { account: undefined };
745
+ }
746
+ exports.OnboardResponse = {
747
+ encode(message, writer = new wire_1.BinaryWriter()) {
748
+ if (message.account !== undefined) {
749
+ exports.Account.encode(message.account, writer.uint32(10).fork()).join();
750
+ }
751
+ return writer;
752
+ },
753
+ decode(input, length) {
754
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
755
+ const end = length === undefined ? reader.len : reader.pos + length;
756
+ const message = createBaseOnboardResponse();
757
+ while (reader.pos < end) {
758
+ const tag = reader.uint32();
759
+ switch (tag >>> 3) {
760
+ case 1: {
761
+ if (tag !== 10) {
762
+ break;
763
+ }
764
+ message.account = exports.Account.decode(reader, reader.uint32());
765
+ continue;
766
+ }
767
+ }
768
+ if ((tag & 7) === 4 || tag === 0) {
769
+ break;
770
+ }
771
+ reader.skip(tag & 7);
772
+ }
773
+ return message;
774
+ },
775
+ fromJSON(object) {
776
+ return { account: isSet(object.account) ? exports.Account.fromJSON(object.account) : undefined };
777
+ },
778
+ toJSON(message) {
779
+ const obj = {};
780
+ if (message.account !== undefined) {
781
+ obj.account = exports.Account.toJSON(message.account);
782
+ }
783
+ return obj;
784
+ },
785
+ create(base) {
786
+ return exports.OnboardResponse.fromPartial(base !== null && base !== void 0 ? base : {});
787
+ },
788
+ fromPartial(object) {
789
+ const message = createBaseOnboardResponse();
790
+ message.account = (object.account !== undefined && object.account !== null)
791
+ ? exports.Account.fromPartial(object.account)
792
+ : undefined;
793
+ return message;
794
+ },
795
+ };
796
+ function createBaseApplyForRepresentativeRequest() {
797
+ return {
798
+ positionId: "",
799
+ constituencyId: "",
800
+ districtId: "",
801
+ partyId: "",
802
+ swornInDate: "",
803
+ bio: "",
804
+ socialHandles: "",
805
+ proofOfOffice: new Uint8Array(0),
806
+ };
807
+ }
808
+ exports.ApplyForRepresentativeRequest = {
809
+ encode(message, writer = new wire_1.BinaryWriter()) {
810
+ if (message.positionId !== "") {
811
+ writer.uint32(10).string(message.positionId);
812
+ }
813
+ if (message.constituencyId !== "") {
814
+ writer.uint32(18).string(message.constituencyId);
815
+ }
816
+ if (message.districtId !== "") {
817
+ writer.uint32(26).string(message.districtId);
818
+ }
819
+ if (message.partyId !== "") {
820
+ writer.uint32(34).string(message.partyId);
821
+ }
822
+ if (message.swornInDate !== "") {
823
+ writer.uint32(42).string(message.swornInDate);
824
+ }
825
+ if (message.bio !== "") {
826
+ writer.uint32(50).string(message.bio);
827
+ }
828
+ if (message.socialHandles !== "") {
829
+ writer.uint32(58).string(message.socialHandles);
830
+ }
831
+ if (message.proofOfOffice.length !== 0) {
832
+ writer.uint32(66).bytes(message.proofOfOffice);
833
+ }
834
+ return writer;
835
+ },
836
+ decode(input, length) {
837
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
838
+ const end = length === undefined ? reader.len : reader.pos + length;
839
+ const message = createBaseApplyForRepresentativeRequest();
840
+ while (reader.pos < end) {
841
+ const tag = reader.uint32();
842
+ switch (tag >>> 3) {
843
+ case 1: {
844
+ if (tag !== 10) {
845
+ break;
846
+ }
847
+ message.positionId = reader.string();
848
+ continue;
849
+ }
850
+ case 2: {
851
+ if (tag !== 18) {
852
+ break;
853
+ }
854
+ message.constituencyId = reader.string();
855
+ continue;
856
+ }
857
+ case 3: {
858
+ if (tag !== 26) {
859
+ break;
860
+ }
861
+ message.districtId = reader.string();
862
+ continue;
863
+ }
864
+ case 4: {
865
+ if (tag !== 34) {
866
+ break;
867
+ }
868
+ message.partyId = reader.string();
869
+ continue;
870
+ }
871
+ case 5: {
872
+ if (tag !== 42) {
873
+ break;
874
+ }
875
+ message.swornInDate = reader.string();
876
+ continue;
877
+ }
878
+ case 6: {
879
+ if (tag !== 50) {
880
+ break;
881
+ }
882
+ message.bio = reader.string();
883
+ continue;
884
+ }
885
+ case 7: {
886
+ if (tag !== 58) {
887
+ break;
888
+ }
889
+ message.socialHandles = reader.string();
890
+ continue;
891
+ }
892
+ case 8: {
893
+ if (tag !== 66) {
894
+ break;
895
+ }
896
+ message.proofOfOffice = reader.bytes();
897
+ continue;
898
+ }
899
+ }
900
+ if ((tag & 7) === 4 || tag === 0) {
901
+ break;
902
+ }
903
+ reader.skip(tag & 7);
904
+ }
905
+ return message;
906
+ },
907
+ fromJSON(object) {
908
+ return {
909
+ positionId: isSet(object.positionId) ? globalThis.String(object.positionId) : "",
910
+ constituencyId: isSet(object.constituencyId) ? globalThis.String(object.constituencyId) : "",
911
+ districtId: isSet(object.districtId) ? globalThis.String(object.districtId) : "",
912
+ partyId: isSet(object.partyId) ? globalThis.String(object.partyId) : "",
913
+ swornInDate: isSet(object.swornInDate) ? globalThis.String(object.swornInDate) : "",
914
+ bio: isSet(object.bio) ? globalThis.String(object.bio) : "",
915
+ socialHandles: isSet(object.socialHandles) ? globalThis.String(object.socialHandles) : "",
916
+ proofOfOffice: isSet(object.proofOfOffice) ? bytesFromBase64(object.proofOfOffice) : new Uint8Array(0),
917
+ };
918
+ },
919
+ toJSON(message) {
920
+ const obj = {};
921
+ if (message.positionId !== "") {
922
+ obj.positionId = message.positionId;
923
+ }
924
+ if (message.constituencyId !== "") {
925
+ obj.constituencyId = message.constituencyId;
926
+ }
927
+ if (message.districtId !== "") {
928
+ obj.districtId = message.districtId;
929
+ }
930
+ if (message.partyId !== "") {
931
+ obj.partyId = message.partyId;
932
+ }
933
+ if (message.swornInDate !== "") {
934
+ obj.swornInDate = message.swornInDate;
935
+ }
936
+ if (message.bio !== "") {
937
+ obj.bio = message.bio;
938
+ }
939
+ if (message.socialHandles !== "") {
940
+ obj.socialHandles = message.socialHandles;
941
+ }
942
+ if (message.proofOfOffice.length !== 0) {
943
+ obj.proofOfOffice = base64FromBytes(message.proofOfOffice);
944
+ }
945
+ return obj;
946
+ },
947
+ create(base) {
948
+ return exports.ApplyForRepresentativeRequest.fromPartial(base !== null && base !== void 0 ? base : {});
949
+ },
950
+ fromPartial(object) {
951
+ var _a, _b, _c, _d, _e, _f, _g, _h;
952
+ const message = createBaseApplyForRepresentativeRequest();
953
+ message.positionId = (_a = object.positionId) !== null && _a !== void 0 ? _a : "";
954
+ message.constituencyId = (_b = object.constituencyId) !== null && _b !== void 0 ? _b : "";
955
+ message.districtId = (_c = object.districtId) !== null && _c !== void 0 ? _c : "";
956
+ message.partyId = (_d = object.partyId) !== null && _d !== void 0 ? _d : "";
957
+ message.swornInDate = (_e = object.swornInDate) !== null && _e !== void 0 ? _e : "";
958
+ message.bio = (_f = object.bio) !== null && _f !== void 0 ? _f : "";
959
+ message.socialHandles = (_g = object.socialHandles) !== null && _g !== void 0 ? _g : "";
960
+ message.proofOfOffice = (_h = object.proofOfOffice) !== null && _h !== void 0 ? _h : new Uint8Array(0);
961
+ return message;
962
+ },
963
+ };
964
+ function createBaseApplyForRepresentativeResponse() {
965
+ return { representative: undefined };
966
+ }
967
+ exports.ApplyForRepresentativeResponse = {
968
+ encode(message, writer = new wire_1.BinaryWriter()) {
969
+ if (message.representative !== undefined) {
970
+ exports.Representative.encode(message.representative, writer.uint32(10).fork()).join();
971
+ }
972
+ return writer;
973
+ },
974
+ decode(input, length) {
975
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
976
+ const end = length === undefined ? reader.len : reader.pos + length;
977
+ const message = createBaseApplyForRepresentativeResponse();
978
+ while (reader.pos < end) {
979
+ const tag = reader.uint32();
980
+ switch (tag >>> 3) {
981
+ case 1: {
982
+ if (tag !== 10) {
983
+ break;
984
+ }
985
+ message.representative = exports.Representative.decode(reader, reader.uint32());
986
+ continue;
987
+ }
988
+ }
989
+ if ((tag & 7) === 4 || tag === 0) {
990
+ break;
991
+ }
992
+ reader.skip(tag & 7);
993
+ }
994
+ return message;
995
+ },
996
+ fromJSON(object) {
997
+ return {
998
+ representative: isSet(object.representative) ? exports.Representative.fromJSON(object.representative) : undefined,
999
+ };
1000
+ },
1001
+ toJSON(message) {
1002
+ const obj = {};
1003
+ if (message.representative !== undefined) {
1004
+ obj.representative = exports.Representative.toJSON(message.representative);
1005
+ }
1006
+ return obj;
1007
+ },
1008
+ create(base) {
1009
+ return exports.ApplyForRepresentativeResponse.fromPartial(base !== null && base !== void 0 ? base : {});
1010
+ },
1011
+ fromPartial(object) {
1012
+ const message = createBaseApplyForRepresentativeResponse();
1013
+ message.representative = (object.representative !== undefined && object.representative !== null)
1014
+ ? exports.Representative.fromPartial(object.representative)
1015
+ : undefined;
1016
+ return message;
1017
+ },
1018
+ };
1019
+ function createBaseAccount() {
1020
+ return {
1021
+ id: "",
1022
+ name: "",
1023
+ email: "",
1024
+ photoUrl: "",
1025
+ coverPhotoUrl: "",
1026
+ phoneNumber: "",
1027
+ gender: "",
1028
+ dob: "",
1029
+ location: "",
1030
+ stateId: "",
1031
+ localGovernmentId: "",
1032
+ accountTypeId: "",
1033
+ pollingUnit: "",
1034
+ emailVerified: false,
1035
+ status: "",
1036
+ kyced: false,
1037
+ createdAt: "",
1038
+ updatedAt: "",
1039
+ };
1040
+ }
1041
+ exports.Account = {
1042
+ encode(message, writer = new wire_1.BinaryWriter()) {
1043
+ if (message.id !== "") {
1044
+ writer.uint32(10).string(message.id);
1045
+ }
1046
+ if (message.name !== "") {
1047
+ writer.uint32(18).string(message.name);
1048
+ }
1049
+ if (message.email !== "") {
1050
+ writer.uint32(26).string(message.email);
1051
+ }
1052
+ if (message.photoUrl !== "") {
1053
+ writer.uint32(34).string(message.photoUrl);
1054
+ }
1055
+ if (message.coverPhotoUrl !== "") {
1056
+ writer.uint32(42).string(message.coverPhotoUrl);
1057
+ }
1058
+ if (message.phoneNumber !== "") {
1059
+ writer.uint32(50).string(message.phoneNumber);
1060
+ }
1061
+ if (message.gender !== "") {
1062
+ writer.uint32(58).string(message.gender);
1063
+ }
1064
+ if (message.dob !== "") {
1065
+ writer.uint32(66).string(message.dob);
1066
+ }
1067
+ if (message.location !== "") {
1068
+ writer.uint32(74).string(message.location);
1069
+ }
1070
+ if (message.stateId !== "") {
1071
+ writer.uint32(82).string(message.stateId);
1072
+ }
1073
+ if (message.localGovernmentId !== "") {
1074
+ writer.uint32(90).string(message.localGovernmentId);
1075
+ }
1076
+ if (message.accountTypeId !== "") {
1077
+ writer.uint32(98).string(message.accountTypeId);
1078
+ }
1079
+ if (message.pollingUnit !== "") {
1080
+ writer.uint32(106).string(message.pollingUnit);
1081
+ }
1082
+ if (message.emailVerified !== false) {
1083
+ writer.uint32(112).bool(message.emailVerified);
1084
+ }
1085
+ if (message.status !== "") {
1086
+ writer.uint32(122).string(message.status);
1087
+ }
1088
+ if (message.kyced !== false) {
1089
+ writer.uint32(128).bool(message.kyced);
1090
+ }
1091
+ if (message.createdAt !== "") {
1092
+ writer.uint32(138).string(message.createdAt);
1093
+ }
1094
+ if (message.updatedAt !== "") {
1095
+ writer.uint32(146).string(message.updatedAt);
1096
+ }
1097
+ return writer;
1098
+ },
1099
+ decode(input, length) {
1100
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1101
+ const end = length === undefined ? reader.len : reader.pos + length;
1102
+ const message = createBaseAccount();
1103
+ while (reader.pos < end) {
1104
+ const tag = reader.uint32();
1105
+ switch (tag >>> 3) {
1106
+ case 1: {
1107
+ if (tag !== 10) {
1108
+ break;
1109
+ }
1110
+ message.id = reader.string();
1111
+ continue;
1112
+ }
1113
+ case 2: {
1114
+ if (tag !== 18) {
1115
+ break;
1116
+ }
1117
+ message.name = reader.string();
1118
+ continue;
1119
+ }
1120
+ case 3: {
1121
+ if (tag !== 26) {
1122
+ break;
1123
+ }
1124
+ message.email = reader.string();
1125
+ continue;
1126
+ }
1127
+ case 4: {
1128
+ if (tag !== 34) {
1129
+ break;
1130
+ }
1131
+ message.photoUrl = reader.string();
1132
+ continue;
1133
+ }
1134
+ case 5: {
1135
+ if (tag !== 42) {
1136
+ break;
1137
+ }
1138
+ message.coverPhotoUrl = reader.string();
1139
+ continue;
1140
+ }
1141
+ case 6: {
1142
+ if (tag !== 50) {
1143
+ break;
1144
+ }
1145
+ message.phoneNumber = reader.string();
1146
+ continue;
1147
+ }
1148
+ case 7: {
1149
+ if (tag !== 58) {
1150
+ break;
1151
+ }
1152
+ message.gender = reader.string();
1153
+ continue;
1154
+ }
1155
+ case 8: {
1156
+ if (tag !== 66) {
1157
+ break;
1158
+ }
1159
+ message.dob = reader.string();
1160
+ continue;
1161
+ }
1162
+ case 9: {
1163
+ if (tag !== 74) {
1164
+ break;
1165
+ }
1166
+ message.location = reader.string();
1167
+ continue;
1168
+ }
1169
+ case 10: {
1170
+ if (tag !== 82) {
1171
+ break;
1172
+ }
1173
+ message.stateId = reader.string();
1174
+ continue;
1175
+ }
1176
+ case 11: {
1177
+ if (tag !== 90) {
1178
+ break;
1179
+ }
1180
+ message.localGovernmentId = reader.string();
1181
+ continue;
1182
+ }
1183
+ case 12: {
1184
+ if (tag !== 98) {
1185
+ break;
1186
+ }
1187
+ message.accountTypeId = reader.string();
1188
+ continue;
1189
+ }
1190
+ case 13: {
1191
+ if (tag !== 106) {
1192
+ break;
1193
+ }
1194
+ message.pollingUnit = reader.string();
1195
+ continue;
1196
+ }
1197
+ case 14: {
1198
+ if (tag !== 112) {
1199
+ break;
1200
+ }
1201
+ message.emailVerified = reader.bool();
1202
+ continue;
1203
+ }
1204
+ case 15: {
1205
+ if (tag !== 122) {
1206
+ break;
1207
+ }
1208
+ message.status = reader.string();
1209
+ continue;
1210
+ }
1211
+ case 16: {
1212
+ if (tag !== 128) {
1213
+ break;
1214
+ }
1215
+ message.kyced = reader.bool();
1216
+ continue;
1217
+ }
1218
+ case 17: {
1219
+ if (tag !== 138) {
1220
+ break;
1221
+ }
1222
+ message.createdAt = reader.string();
1223
+ continue;
1224
+ }
1225
+ case 18: {
1226
+ if (tag !== 146) {
1227
+ break;
1228
+ }
1229
+ message.updatedAt = reader.string();
1230
+ continue;
1231
+ }
1232
+ }
1233
+ if ((tag & 7) === 4 || tag === 0) {
1234
+ break;
1235
+ }
1236
+ reader.skip(tag & 7);
1237
+ }
1238
+ return message;
1239
+ },
1240
+ fromJSON(object) {
1241
+ return {
1242
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1243
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
1244
+ email: isSet(object.email) ? globalThis.String(object.email) : "",
1245
+ photoUrl: isSet(object.photoUrl) ? globalThis.String(object.photoUrl) : "",
1246
+ coverPhotoUrl: isSet(object.coverPhotoUrl) ? globalThis.String(object.coverPhotoUrl) : "",
1247
+ phoneNumber: isSet(object.phoneNumber) ? globalThis.String(object.phoneNumber) : "",
1248
+ gender: isSet(object.gender) ? globalThis.String(object.gender) : "",
1249
+ dob: isSet(object.dob) ? globalThis.String(object.dob) : "",
1250
+ location: isSet(object.location) ? globalThis.String(object.location) : "",
1251
+ stateId: isSet(object.stateId) ? globalThis.String(object.stateId) : "",
1252
+ localGovernmentId: isSet(object.localGovernmentId) ? globalThis.String(object.localGovernmentId) : "",
1253
+ accountTypeId: isSet(object.accountTypeId) ? globalThis.String(object.accountTypeId) : "",
1254
+ pollingUnit: isSet(object.pollingUnit) ? globalThis.String(object.pollingUnit) : "",
1255
+ emailVerified: isSet(object.emailVerified) ? globalThis.Boolean(object.emailVerified) : false,
1256
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
1257
+ kyced: isSet(object.kyced) ? globalThis.Boolean(object.kyced) : false,
1258
+ createdAt: isSet(object.createdAt) ? globalThis.String(object.createdAt) : "",
1259
+ updatedAt: isSet(object.updatedAt) ? globalThis.String(object.updatedAt) : "",
1260
+ };
1261
+ },
1262
+ toJSON(message) {
1263
+ const obj = {};
1264
+ if (message.id !== "") {
1265
+ obj.id = message.id;
1266
+ }
1267
+ if (message.name !== "") {
1268
+ obj.name = message.name;
1269
+ }
1270
+ if (message.email !== "") {
1271
+ obj.email = message.email;
1272
+ }
1273
+ if (message.photoUrl !== "") {
1274
+ obj.photoUrl = message.photoUrl;
1275
+ }
1276
+ if (message.coverPhotoUrl !== "") {
1277
+ obj.coverPhotoUrl = message.coverPhotoUrl;
1278
+ }
1279
+ if (message.phoneNumber !== "") {
1280
+ obj.phoneNumber = message.phoneNumber;
1281
+ }
1282
+ if (message.gender !== "") {
1283
+ obj.gender = message.gender;
1284
+ }
1285
+ if (message.dob !== "") {
1286
+ obj.dob = message.dob;
1287
+ }
1288
+ if (message.location !== "") {
1289
+ obj.location = message.location;
1290
+ }
1291
+ if (message.stateId !== "") {
1292
+ obj.stateId = message.stateId;
1293
+ }
1294
+ if (message.localGovernmentId !== "") {
1295
+ obj.localGovernmentId = message.localGovernmentId;
1296
+ }
1297
+ if (message.accountTypeId !== "") {
1298
+ obj.accountTypeId = message.accountTypeId;
1299
+ }
1300
+ if (message.pollingUnit !== "") {
1301
+ obj.pollingUnit = message.pollingUnit;
1302
+ }
1303
+ if (message.emailVerified !== false) {
1304
+ obj.emailVerified = message.emailVerified;
1305
+ }
1306
+ if (message.status !== "") {
1307
+ obj.status = message.status;
1308
+ }
1309
+ if (message.kyced !== false) {
1310
+ obj.kyced = message.kyced;
1311
+ }
1312
+ if (message.createdAt !== "") {
1313
+ obj.createdAt = message.createdAt;
1314
+ }
1315
+ if (message.updatedAt !== "") {
1316
+ obj.updatedAt = message.updatedAt;
1317
+ }
1318
+ return obj;
1319
+ },
1320
+ create(base) {
1321
+ return exports.Account.fromPartial(base !== null && base !== void 0 ? base : {});
1322
+ },
1323
+ fromPartial(object) {
1324
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
1325
+ const message = createBaseAccount();
1326
+ message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
1327
+ message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
1328
+ message.email = (_c = object.email) !== null && _c !== void 0 ? _c : "";
1329
+ message.photoUrl = (_d = object.photoUrl) !== null && _d !== void 0 ? _d : "";
1330
+ message.coverPhotoUrl = (_e = object.coverPhotoUrl) !== null && _e !== void 0 ? _e : "";
1331
+ message.phoneNumber = (_f = object.phoneNumber) !== null && _f !== void 0 ? _f : "";
1332
+ message.gender = (_g = object.gender) !== null && _g !== void 0 ? _g : "";
1333
+ message.dob = (_h = object.dob) !== null && _h !== void 0 ? _h : "";
1334
+ message.location = (_j = object.location) !== null && _j !== void 0 ? _j : "";
1335
+ message.stateId = (_k = object.stateId) !== null && _k !== void 0 ? _k : "";
1336
+ message.localGovernmentId = (_l = object.localGovernmentId) !== null && _l !== void 0 ? _l : "";
1337
+ message.accountTypeId = (_m = object.accountTypeId) !== null && _m !== void 0 ? _m : "";
1338
+ message.pollingUnit = (_o = object.pollingUnit) !== null && _o !== void 0 ? _o : "";
1339
+ message.emailVerified = (_p = object.emailVerified) !== null && _p !== void 0 ? _p : false;
1340
+ message.status = (_q = object.status) !== null && _q !== void 0 ? _q : "";
1341
+ message.kyced = (_r = object.kyced) !== null && _r !== void 0 ? _r : false;
1342
+ message.createdAt = (_s = object.createdAt) !== null && _s !== void 0 ? _s : "";
1343
+ message.updatedAt = (_t = object.updatedAt) !== null && _t !== void 0 ? _t : "";
1344
+ return message;
1345
+ },
1346
+ };
1347
+ function createBaseAccountStatus() {
1348
+ return {
1349
+ emailVerified: false,
1350
+ onboarded: false,
1351
+ kyced: false,
1352
+ status: "",
1353
+ isRepresentative: false,
1354
+ representative: undefined,
1355
+ onboardingProgress: undefined,
1356
+ };
1357
+ }
1358
+ exports.AccountStatus = {
1359
+ encode(message, writer = new wire_1.BinaryWriter()) {
1360
+ if (message.emailVerified !== false) {
1361
+ writer.uint32(8).bool(message.emailVerified);
1362
+ }
1363
+ if (message.onboarded !== false) {
1364
+ writer.uint32(16).bool(message.onboarded);
1365
+ }
1366
+ if (message.kyced !== false) {
1367
+ writer.uint32(24).bool(message.kyced);
1368
+ }
1369
+ if (message.status !== "") {
1370
+ writer.uint32(34).string(message.status);
1371
+ }
1372
+ if (message.isRepresentative !== false) {
1373
+ writer.uint32(40).bool(message.isRepresentative);
1374
+ }
1375
+ if (message.representative !== undefined) {
1376
+ exports.Representative.encode(message.representative, writer.uint32(50).fork()).join();
1377
+ }
1378
+ if (message.onboardingProgress !== undefined) {
1379
+ exports.OnboardingProgress.encode(message.onboardingProgress, writer.uint32(58).fork()).join();
1380
+ }
1381
+ return writer;
1382
+ },
1383
+ decode(input, length) {
1384
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1385
+ const end = length === undefined ? reader.len : reader.pos + length;
1386
+ const message = createBaseAccountStatus();
1387
+ while (reader.pos < end) {
1388
+ const tag = reader.uint32();
1389
+ switch (tag >>> 3) {
1390
+ case 1: {
1391
+ if (tag !== 8) {
1392
+ break;
1393
+ }
1394
+ message.emailVerified = reader.bool();
1395
+ continue;
1396
+ }
1397
+ case 2: {
1398
+ if (tag !== 16) {
1399
+ break;
1400
+ }
1401
+ message.onboarded = reader.bool();
1402
+ continue;
1403
+ }
1404
+ case 3: {
1405
+ if (tag !== 24) {
1406
+ break;
1407
+ }
1408
+ message.kyced = reader.bool();
1409
+ continue;
1410
+ }
1411
+ case 4: {
1412
+ if (tag !== 34) {
1413
+ break;
1414
+ }
1415
+ message.status = reader.string();
1416
+ continue;
1417
+ }
1418
+ case 5: {
1419
+ if (tag !== 40) {
1420
+ break;
1421
+ }
1422
+ message.isRepresentative = reader.bool();
1423
+ continue;
1424
+ }
1425
+ case 6: {
1426
+ if (tag !== 50) {
1427
+ break;
1428
+ }
1429
+ message.representative = exports.Representative.decode(reader, reader.uint32());
1430
+ continue;
1431
+ }
1432
+ case 7: {
1433
+ if (tag !== 58) {
1434
+ break;
1435
+ }
1436
+ message.onboardingProgress = exports.OnboardingProgress.decode(reader, reader.uint32());
1437
+ continue;
1438
+ }
1439
+ }
1440
+ if ((tag & 7) === 4 || tag === 0) {
1441
+ break;
1442
+ }
1443
+ reader.skip(tag & 7);
1444
+ }
1445
+ return message;
1446
+ },
1447
+ fromJSON(object) {
1448
+ return {
1449
+ emailVerified: isSet(object.emailVerified) ? globalThis.Boolean(object.emailVerified) : false,
1450
+ onboarded: isSet(object.onboarded) ? globalThis.Boolean(object.onboarded) : false,
1451
+ kyced: isSet(object.kyced) ? globalThis.Boolean(object.kyced) : false,
1452
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
1453
+ isRepresentative: isSet(object.isRepresentative) ? globalThis.Boolean(object.isRepresentative) : false,
1454
+ representative: isSet(object.representative) ? exports.Representative.fromJSON(object.representative) : undefined,
1455
+ onboardingProgress: isSet(object.onboardingProgress)
1456
+ ? exports.OnboardingProgress.fromJSON(object.onboardingProgress)
1457
+ : undefined,
1458
+ };
1459
+ },
1460
+ toJSON(message) {
1461
+ const obj = {};
1462
+ if (message.emailVerified !== false) {
1463
+ obj.emailVerified = message.emailVerified;
1464
+ }
1465
+ if (message.onboarded !== false) {
1466
+ obj.onboarded = message.onboarded;
1467
+ }
1468
+ if (message.kyced !== false) {
1469
+ obj.kyced = message.kyced;
1470
+ }
1471
+ if (message.status !== "") {
1472
+ obj.status = message.status;
1473
+ }
1474
+ if (message.isRepresentative !== false) {
1475
+ obj.isRepresentative = message.isRepresentative;
1476
+ }
1477
+ if (message.representative !== undefined) {
1478
+ obj.representative = exports.Representative.toJSON(message.representative);
1479
+ }
1480
+ if (message.onboardingProgress !== undefined) {
1481
+ obj.onboardingProgress = exports.OnboardingProgress.toJSON(message.onboardingProgress);
1482
+ }
1483
+ return obj;
1484
+ },
1485
+ create(base) {
1486
+ return exports.AccountStatus.fromPartial(base !== null && base !== void 0 ? base : {});
1487
+ },
1488
+ fromPartial(object) {
1489
+ var _a, _b, _c, _d, _e;
1490
+ const message = createBaseAccountStatus();
1491
+ message.emailVerified = (_a = object.emailVerified) !== null && _a !== void 0 ? _a : false;
1492
+ message.onboarded = (_b = object.onboarded) !== null && _b !== void 0 ? _b : false;
1493
+ message.kyced = (_c = object.kyced) !== null && _c !== void 0 ? _c : false;
1494
+ message.status = (_d = object.status) !== null && _d !== void 0 ? _d : "";
1495
+ message.isRepresentative = (_e = object.isRepresentative) !== null && _e !== void 0 ? _e : false;
1496
+ message.representative = (object.representative !== undefined && object.representative !== null)
1497
+ ? exports.Representative.fromPartial(object.representative)
1498
+ : undefined;
1499
+ message.onboardingProgress = (object.onboardingProgress !== undefined && object.onboardingProgress !== null)
1500
+ ? exports.OnboardingProgress.fromPartial(object.onboardingProgress)
1501
+ : undefined;
1502
+ return message;
1503
+ },
1504
+ };
1505
+ function createBaseOnboardingProgress() {
1506
+ return {
1507
+ completedSteps: 0,
1508
+ totalSteps: 0,
1509
+ hasName: false,
1510
+ hasPhoneNumber: false,
1511
+ hasGender: false,
1512
+ hasDob: false,
1513
+ hasLocation: false,
1514
+ hasState: false,
1515
+ hasPollingUnit: false,
1516
+ };
1517
+ }
1518
+ exports.OnboardingProgress = {
1519
+ encode(message, writer = new wire_1.BinaryWriter()) {
1520
+ if (message.completedSteps !== 0) {
1521
+ writer.uint32(8).int32(message.completedSteps);
1522
+ }
1523
+ if (message.totalSteps !== 0) {
1524
+ writer.uint32(16).int32(message.totalSteps);
1525
+ }
1526
+ if (message.hasName !== false) {
1527
+ writer.uint32(24).bool(message.hasName);
1528
+ }
1529
+ if (message.hasPhoneNumber !== false) {
1530
+ writer.uint32(32).bool(message.hasPhoneNumber);
1531
+ }
1532
+ if (message.hasGender !== false) {
1533
+ writer.uint32(40).bool(message.hasGender);
1534
+ }
1535
+ if (message.hasDob !== false) {
1536
+ writer.uint32(48).bool(message.hasDob);
1537
+ }
1538
+ if (message.hasLocation !== false) {
1539
+ writer.uint32(56).bool(message.hasLocation);
1540
+ }
1541
+ if (message.hasState !== false) {
1542
+ writer.uint32(64).bool(message.hasState);
1543
+ }
1544
+ if (message.hasPollingUnit !== false) {
1545
+ writer.uint32(72).bool(message.hasPollingUnit);
1546
+ }
1547
+ return writer;
1548
+ },
1549
+ decode(input, length) {
1550
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1551
+ const end = length === undefined ? reader.len : reader.pos + length;
1552
+ const message = createBaseOnboardingProgress();
1553
+ while (reader.pos < end) {
1554
+ const tag = reader.uint32();
1555
+ switch (tag >>> 3) {
1556
+ case 1: {
1557
+ if (tag !== 8) {
1558
+ break;
1559
+ }
1560
+ message.completedSteps = reader.int32();
1561
+ continue;
1562
+ }
1563
+ case 2: {
1564
+ if (tag !== 16) {
1565
+ break;
1566
+ }
1567
+ message.totalSteps = reader.int32();
1568
+ continue;
1569
+ }
1570
+ case 3: {
1571
+ if (tag !== 24) {
1572
+ break;
1573
+ }
1574
+ message.hasName = reader.bool();
1575
+ continue;
1576
+ }
1577
+ case 4: {
1578
+ if (tag !== 32) {
1579
+ break;
1580
+ }
1581
+ message.hasPhoneNumber = reader.bool();
1582
+ continue;
1583
+ }
1584
+ case 5: {
1585
+ if (tag !== 40) {
1586
+ break;
1587
+ }
1588
+ message.hasGender = reader.bool();
1589
+ continue;
1590
+ }
1591
+ case 6: {
1592
+ if (tag !== 48) {
1593
+ break;
1594
+ }
1595
+ message.hasDob = reader.bool();
1596
+ continue;
1597
+ }
1598
+ case 7: {
1599
+ if (tag !== 56) {
1600
+ break;
1601
+ }
1602
+ message.hasLocation = reader.bool();
1603
+ continue;
1604
+ }
1605
+ case 8: {
1606
+ if (tag !== 64) {
1607
+ break;
1608
+ }
1609
+ message.hasState = reader.bool();
1610
+ continue;
1611
+ }
1612
+ case 9: {
1613
+ if (tag !== 72) {
1614
+ break;
1615
+ }
1616
+ message.hasPollingUnit = reader.bool();
1617
+ continue;
1618
+ }
1619
+ }
1620
+ if ((tag & 7) === 4 || tag === 0) {
1621
+ break;
1622
+ }
1623
+ reader.skip(tag & 7);
1624
+ }
1625
+ return message;
1626
+ },
1627
+ fromJSON(object) {
1628
+ return {
1629
+ completedSteps: isSet(object.completedSteps) ? globalThis.Number(object.completedSteps) : 0,
1630
+ totalSteps: isSet(object.totalSteps) ? globalThis.Number(object.totalSteps) : 0,
1631
+ hasName: isSet(object.hasName) ? globalThis.Boolean(object.hasName) : false,
1632
+ hasPhoneNumber: isSet(object.hasPhoneNumber) ? globalThis.Boolean(object.hasPhoneNumber) : false,
1633
+ hasGender: isSet(object.hasGender) ? globalThis.Boolean(object.hasGender) : false,
1634
+ hasDob: isSet(object.hasDob) ? globalThis.Boolean(object.hasDob) : false,
1635
+ hasLocation: isSet(object.hasLocation) ? globalThis.Boolean(object.hasLocation) : false,
1636
+ hasState: isSet(object.hasState) ? globalThis.Boolean(object.hasState) : false,
1637
+ hasPollingUnit: isSet(object.hasPollingUnit) ? globalThis.Boolean(object.hasPollingUnit) : false,
1638
+ };
1639
+ },
1640
+ toJSON(message) {
1641
+ const obj = {};
1642
+ if (message.completedSteps !== 0) {
1643
+ obj.completedSteps = Math.round(message.completedSteps);
1644
+ }
1645
+ if (message.totalSteps !== 0) {
1646
+ obj.totalSteps = Math.round(message.totalSteps);
1647
+ }
1648
+ if (message.hasName !== false) {
1649
+ obj.hasName = message.hasName;
1650
+ }
1651
+ if (message.hasPhoneNumber !== false) {
1652
+ obj.hasPhoneNumber = message.hasPhoneNumber;
1653
+ }
1654
+ if (message.hasGender !== false) {
1655
+ obj.hasGender = message.hasGender;
1656
+ }
1657
+ if (message.hasDob !== false) {
1658
+ obj.hasDob = message.hasDob;
1659
+ }
1660
+ if (message.hasLocation !== false) {
1661
+ obj.hasLocation = message.hasLocation;
1662
+ }
1663
+ if (message.hasState !== false) {
1664
+ obj.hasState = message.hasState;
1665
+ }
1666
+ if (message.hasPollingUnit !== false) {
1667
+ obj.hasPollingUnit = message.hasPollingUnit;
1668
+ }
1669
+ return obj;
1670
+ },
1671
+ create(base) {
1672
+ return exports.OnboardingProgress.fromPartial(base !== null && base !== void 0 ? base : {});
1673
+ },
1674
+ fromPartial(object) {
1675
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1676
+ const message = createBaseOnboardingProgress();
1677
+ message.completedSteps = (_a = object.completedSteps) !== null && _a !== void 0 ? _a : 0;
1678
+ message.totalSteps = (_b = object.totalSteps) !== null && _b !== void 0 ? _b : 0;
1679
+ message.hasName = (_c = object.hasName) !== null && _c !== void 0 ? _c : false;
1680
+ message.hasPhoneNumber = (_d = object.hasPhoneNumber) !== null && _d !== void 0 ? _d : false;
1681
+ message.hasGender = (_e = object.hasGender) !== null && _e !== void 0 ? _e : false;
1682
+ message.hasDob = (_f = object.hasDob) !== null && _f !== void 0 ? _f : false;
1683
+ message.hasLocation = (_g = object.hasLocation) !== null && _g !== void 0 ? _g : false;
1684
+ message.hasState = (_h = object.hasState) !== null && _h !== void 0 ? _h : false;
1685
+ message.hasPollingUnit = (_j = object.hasPollingUnit) !== null && _j !== void 0 ? _j : false;
1686
+ return message;
1687
+ },
1688
+ };
1689
+ function createBaseRepresentative() {
1690
+ return {
1691
+ id: "",
1692
+ accountId: "",
1693
+ positionId: "",
1694
+ constituencyId: "",
1695
+ districtId: "",
1696
+ partyId: "",
1697
+ swornInDate: "",
1698
+ bio: "",
1699
+ socialHandles: "",
1700
+ approved: false,
1701
+ status: "",
1702
+ };
1703
+ }
1704
+ exports.Representative = {
1705
+ encode(message, writer = new wire_1.BinaryWriter()) {
1706
+ if (message.id !== "") {
1707
+ writer.uint32(10).string(message.id);
1708
+ }
1709
+ if (message.accountId !== "") {
1710
+ writer.uint32(18).string(message.accountId);
1711
+ }
1712
+ if (message.positionId !== "") {
1713
+ writer.uint32(26).string(message.positionId);
1714
+ }
1715
+ if (message.constituencyId !== "") {
1716
+ writer.uint32(34).string(message.constituencyId);
1717
+ }
1718
+ if (message.districtId !== "") {
1719
+ writer.uint32(42).string(message.districtId);
1720
+ }
1721
+ if (message.partyId !== "") {
1722
+ writer.uint32(50).string(message.partyId);
1723
+ }
1724
+ if (message.swornInDate !== "") {
1725
+ writer.uint32(58).string(message.swornInDate);
1726
+ }
1727
+ if (message.bio !== "") {
1728
+ writer.uint32(66).string(message.bio);
1729
+ }
1730
+ if (message.socialHandles !== "") {
1731
+ writer.uint32(74).string(message.socialHandles);
1732
+ }
1733
+ if (message.approved !== false) {
1734
+ writer.uint32(80).bool(message.approved);
1735
+ }
1736
+ if (message.status !== "") {
1737
+ writer.uint32(90).string(message.status);
1738
+ }
1739
+ return writer;
1740
+ },
1741
+ decode(input, length) {
1742
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1743
+ const end = length === undefined ? reader.len : reader.pos + length;
1744
+ const message = createBaseRepresentative();
1745
+ while (reader.pos < end) {
1746
+ const tag = reader.uint32();
1747
+ switch (tag >>> 3) {
1748
+ case 1: {
1749
+ if (tag !== 10) {
1750
+ break;
1751
+ }
1752
+ message.id = reader.string();
1753
+ continue;
1754
+ }
1755
+ case 2: {
1756
+ if (tag !== 18) {
1757
+ break;
1758
+ }
1759
+ message.accountId = reader.string();
1760
+ continue;
1761
+ }
1762
+ case 3: {
1763
+ if (tag !== 26) {
1764
+ break;
1765
+ }
1766
+ message.positionId = reader.string();
1767
+ continue;
1768
+ }
1769
+ case 4: {
1770
+ if (tag !== 34) {
1771
+ break;
1772
+ }
1773
+ message.constituencyId = reader.string();
1774
+ continue;
1775
+ }
1776
+ case 5: {
1777
+ if (tag !== 42) {
1778
+ break;
1779
+ }
1780
+ message.districtId = reader.string();
1781
+ continue;
1782
+ }
1783
+ case 6: {
1784
+ if (tag !== 50) {
1785
+ break;
1786
+ }
1787
+ message.partyId = reader.string();
1788
+ continue;
1789
+ }
1790
+ case 7: {
1791
+ if (tag !== 58) {
1792
+ break;
1793
+ }
1794
+ message.swornInDate = reader.string();
1795
+ continue;
1796
+ }
1797
+ case 8: {
1798
+ if (tag !== 66) {
1799
+ break;
1800
+ }
1801
+ message.bio = reader.string();
1802
+ continue;
1803
+ }
1804
+ case 9: {
1805
+ if (tag !== 74) {
1806
+ break;
1807
+ }
1808
+ message.socialHandles = reader.string();
1809
+ continue;
1810
+ }
1811
+ case 10: {
1812
+ if (tag !== 80) {
1813
+ break;
1814
+ }
1815
+ message.approved = reader.bool();
1816
+ continue;
1817
+ }
1818
+ case 11: {
1819
+ if (tag !== 90) {
1820
+ break;
1821
+ }
1822
+ message.status = reader.string();
1823
+ continue;
1824
+ }
1825
+ }
1826
+ if ((tag & 7) === 4 || tag === 0) {
1827
+ break;
1828
+ }
1829
+ reader.skip(tag & 7);
1830
+ }
1831
+ return message;
1832
+ },
1833
+ fromJSON(object) {
1834
+ return {
1835
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1836
+ accountId: isSet(object.accountId) ? globalThis.String(object.accountId) : "",
1837
+ positionId: isSet(object.positionId) ? globalThis.String(object.positionId) : "",
1838
+ constituencyId: isSet(object.constituencyId) ? globalThis.String(object.constituencyId) : "",
1839
+ districtId: isSet(object.districtId) ? globalThis.String(object.districtId) : "",
1840
+ partyId: isSet(object.partyId) ? globalThis.String(object.partyId) : "",
1841
+ swornInDate: isSet(object.swornInDate) ? globalThis.String(object.swornInDate) : "",
1842
+ bio: isSet(object.bio) ? globalThis.String(object.bio) : "",
1843
+ socialHandles: isSet(object.socialHandles) ? globalThis.String(object.socialHandles) : "",
1844
+ approved: isSet(object.approved) ? globalThis.Boolean(object.approved) : false,
1845
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
1846
+ };
1847
+ },
1848
+ toJSON(message) {
1849
+ const obj = {};
1850
+ if (message.id !== "") {
1851
+ obj.id = message.id;
1852
+ }
1853
+ if (message.accountId !== "") {
1854
+ obj.accountId = message.accountId;
1855
+ }
1856
+ if (message.positionId !== "") {
1857
+ obj.positionId = message.positionId;
1858
+ }
1859
+ if (message.constituencyId !== "") {
1860
+ obj.constituencyId = message.constituencyId;
1861
+ }
1862
+ if (message.districtId !== "") {
1863
+ obj.districtId = message.districtId;
1864
+ }
1865
+ if (message.partyId !== "") {
1866
+ obj.partyId = message.partyId;
1867
+ }
1868
+ if (message.swornInDate !== "") {
1869
+ obj.swornInDate = message.swornInDate;
1870
+ }
1871
+ if (message.bio !== "") {
1872
+ obj.bio = message.bio;
1873
+ }
1874
+ if (message.socialHandles !== "") {
1875
+ obj.socialHandles = message.socialHandles;
1876
+ }
1877
+ if (message.approved !== false) {
1878
+ obj.approved = message.approved;
1879
+ }
1880
+ if (message.status !== "") {
1881
+ obj.status = message.status;
1882
+ }
1883
+ return obj;
1884
+ },
1885
+ create(base) {
1886
+ return exports.Representative.fromPartial(base !== null && base !== void 0 ? base : {});
1887
+ },
1888
+ fromPartial(object) {
1889
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
1890
+ const message = createBaseRepresentative();
1891
+ message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
1892
+ message.accountId = (_b = object.accountId) !== null && _b !== void 0 ? _b : "";
1893
+ message.positionId = (_c = object.positionId) !== null && _c !== void 0 ? _c : "";
1894
+ message.constituencyId = (_d = object.constituencyId) !== null && _d !== void 0 ? _d : "";
1895
+ message.districtId = (_e = object.districtId) !== null && _e !== void 0 ? _e : "";
1896
+ message.partyId = (_f = object.partyId) !== null && _f !== void 0 ? _f : "";
1897
+ message.swornInDate = (_g = object.swornInDate) !== null && _g !== void 0 ? _g : "";
1898
+ message.bio = (_h = object.bio) !== null && _h !== void 0 ? _h : "";
1899
+ message.socialHandles = (_j = object.socialHandles) !== null && _j !== void 0 ? _j : "";
1900
+ message.approved = (_k = object.approved) !== null && _k !== void 0 ? _k : false;
1901
+ message.status = (_l = object.status) !== null && _l !== void 0 ? _l : "";
1902
+ return message;
1903
+ },
1904
+ };
1905
+ exports.AccountServiceDefinition = {
1906
+ name: "AccountService",
1907
+ fullName: "pb.AccountService",
1908
+ methods: {
1909
+ getProfile: {
1910
+ name: "GetProfile",
1911
+ requestType: exports.GetProfileRequest,
1912
+ requestStream: false,
1913
+ responseType: exports.GetProfileResponse,
1914
+ responseStream: false,
1915
+ options: {
1916
+ _unknownFields: {
1917
+ 578365826: [
1918
+ new Uint8Array([
1919
+ 25,
1920
+ 18,
1921
+ 23,
1922
+ 47,
1923
+ 97,
1924
+ 112,
1925
+ 105,
1926
+ 47,
1927
+ 118,
1928
+ 49,
1929
+ 47,
1930
+ 97,
1931
+ 99,
1932
+ 99,
1933
+ 111,
1934
+ 117,
1935
+ 110,
1936
+ 116,
1937
+ 47,
1938
+ 112,
1939
+ 114,
1940
+ 111,
1941
+ 102,
1942
+ 105,
1943
+ 108,
1944
+ 101,
1945
+ ]),
1946
+ ],
1947
+ },
1948
+ },
1949
+ },
1950
+ updateProfile: {
1951
+ name: "UpdateProfile",
1952
+ requestType: exports.UpdateProfileRequest,
1953
+ requestStream: false,
1954
+ responseType: exports.UpdateProfileResponse,
1955
+ responseStream: false,
1956
+ options: {
1957
+ _unknownFields: {
1958
+ 578365826: [
1959
+ new Uint8Array([
1960
+ 28,
1961
+ 26,
1962
+ 23,
1963
+ 47,
1964
+ 97,
1965
+ 112,
1966
+ 105,
1967
+ 47,
1968
+ 118,
1969
+ 49,
1970
+ 47,
1971
+ 97,
1972
+ 99,
1973
+ 99,
1974
+ 111,
1975
+ 117,
1976
+ 110,
1977
+ 116,
1978
+ 47,
1979
+ 112,
1980
+ 114,
1981
+ 111,
1982
+ 102,
1983
+ 105,
1984
+ 108,
1985
+ 101,
1986
+ 58,
1987
+ 1,
1988
+ 42,
1989
+ ]),
1990
+ ],
1991
+ },
1992
+ },
1993
+ },
1994
+ updatePassword: {
1995
+ name: "UpdatePassword",
1996
+ requestType: exports.UpdatePasswordRequest,
1997
+ requestStream: false,
1998
+ responseType: common_1.DeleteResponse,
1999
+ responseStream: false,
2000
+ options: {
2001
+ _unknownFields: {
2002
+ 578365826: [
2003
+ new Uint8Array([
2004
+ 29,
2005
+ 26,
2006
+ 24,
2007
+ 47,
2008
+ 97,
2009
+ 112,
2010
+ 105,
2011
+ 47,
2012
+ 118,
2013
+ 49,
2014
+ 47,
2015
+ 97,
2016
+ 99,
2017
+ 99,
2018
+ 111,
2019
+ 117,
2020
+ 110,
2021
+ 116,
2022
+ 47,
2023
+ 112,
2024
+ 97,
2025
+ 115,
2026
+ 115,
2027
+ 119,
2028
+ 111,
2029
+ 114,
2030
+ 100,
2031
+ 58,
2032
+ 1,
2033
+ 42,
2034
+ ]),
2035
+ ],
2036
+ },
2037
+ },
2038
+ },
2039
+ uploadPhoto: {
2040
+ name: "UploadPhoto",
2041
+ requestType: exports.UploadPhotoRequest,
2042
+ requestStream: false,
2043
+ responseType: exports.UploadPhotoResponse,
2044
+ responseStream: false,
2045
+ options: {
2046
+ _unknownFields: {
2047
+ 578365826: [
2048
+ new Uint8Array([
2049
+ 26,
2050
+ 34,
2051
+ 21,
2052
+ 47,
2053
+ 97,
2054
+ 112,
2055
+ 105,
2056
+ 47,
2057
+ 118,
2058
+ 49,
2059
+ 47,
2060
+ 97,
2061
+ 99,
2062
+ 99,
2063
+ 111,
2064
+ 117,
2065
+ 110,
2066
+ 116,
2067
+ 47,
2068
+ 112,
2069
+ 104,
2070
+ 111,
2071
+ 116,
2072
+ 111,
2073
+ 58,
2074
+ 1,
2075
+ 42,
2076
+ ]),
2077
+ ],
2078
+ },
2079
+ },
2080
+ },
2081
+ onboard: {
2082
+ name: "Onboard",
2083
+ requestType: exports.OnboardRequest,
2084
+ requestStream: false,
2085
+ responseType: exports.OnboardResponse,
2086
+ responseStream: false,
2087
+ options: {
2088
+ _unknownFields: {
2089
+ 578365826: [
2090
+ new Uint8Array([
2091
+ 28,
2092
+ 34,
2093
+ 23,
2094
+ 47,
2095
+ 97,
2096
+ 112,
2097
+ 105,
2098
+ 47,
2099
+ 118,
2100
+ 49,
2101
+ 47,
2102
+ 97,
2103
+ 99,
2104
+ 99,
2105
+ 111,
2106
+ 117,
2107
+ 110,
2108
+ 116,
2109
+ 47,
2110
+ 111,
2111
+ 110,
2112
+ 98,
2113
+ 111,
2114
+ 97,
2115
+ 114,
2116
+ 100,
2117
+ 58,
2118
+ 1,
2119
+ 42,
2120
+ ]),
2121
+ ],
2122
+ },
2123
+ },
2124
+ },
2125
+ applyForRepresentative: {
2126
+ name: "ApplyForRepresentative",
2127
+ requestType: exports.ApplyForRepresentativeRequest,
2128
+ requestStream: false,
2129
+ responseType: exports.ApplyForRepresentativeResponse,
2130
+ responseStream: false,
2131
+ options: {
2132
+ _unknownFields: {
2133
+ 578365826: [
2134
+ new Uint8Array([
2135
+ 41,
2136
+ 34,
2137
+ 36,
2138
+ 47,
2139
+ 97,
2140
+ 112,
2141
+ 105,
2142
+ 47,
2143
+ 118,
2144
+ 49,
2145
+ 47,
2146
+ 97,
2147
+ 99,
2148
+ 99,
2149
+ 111,
2150
+ 117,
2151
+ 110,
2152
+ 116,
2153
+ 47,
2154
+ 114,
2155
+ 101,
2156
+ 112,
2157
+ 114,
2158
+ 101,
2159
+ 115,
2160
+ 101,
2161
+ 110,
2162
+ 116,
2163
+ 97,
2164
+ 116,
2165
+ 105,
2166
+ 118,
2167
+ 101,
2168
+ 47,
2169
+ 97,
2170
+ 112,
2171
+ 112,
2172
+ 108,
2173
+ 121,
2174
+ 58,
2175
+ 1,
2176
+ 42,
2177
+ ]),
2178
+ ],
2179
+ },
2180
+ },
2181
+ },
2182
+ },
2183
+ };
2184
+ function bytesFromBase64(b64) {
2185
+ if (globalThis.Buffer) {
2186
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
2187
+ }
2188
+ else {
2189
+ const bin = globalThis.atob(b64);
2190
+ const arr = new Uint8Array(bin.length);
2191
+ for (let i = 0; i < bin.length; ++i) {
2192
+ arr[i] = bin.charCodeAt(i);
2193
+ }
2194
+ return arr;
2195
+ }
2196
+ }
2197
+ function base64FromBytes(arr) {
2198
+ if (globalThis.Buffer) {
2199
+ return globalThis.Buffer.from(arr).toString("base64");
2200
+ }
2201
+ else {
2202
+ const bin = [];
2203
+ arr.forEach((byte) => {
2204
+ bin.push(globalThis.String.fromCharCode(byte));
2205
+ });
2206
+ return globalThis.btoa(bin.join(""));
2207
+ }
2208
+ }
2209
+ function isSet(value) {
2210
+ return value !== null && value !== undefined;
2211
+ }