naijarea-ts 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/account.js CHANGED
@@ -5,9 +5,10 @@
5
5
  // protoc v6.33.2
6
6
  // source: account.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.AccountServiceDefinition = exports.GetStatusResponse = exports.GetStatusRequest = exports.GetAccountRepostsResponse = exports.GetAccountRepostsRequest = exports.GetAccountLikesResponse = exports.GetAccountLikesRequest = exports.GetAccountMediaResponse = exports.GetAccountMediaRequest = exports.GetAccountRepliesResponse = exports.GetAccountRepliesRequest = exports.GetAccountPostsResponse = exports.GetAccountPostsRequest = exports.GetFollowingResponse = exports.GetFollowingRequest = exports.GetFollowersResponse = exports.GetFollowersRequest = exports.UnfollowUserResponse = exports.UnfollowUserRequest = exports.FollowUserResponse = exports.FollowUserRequest = exports.Representative = exports.OnboardingProgress = exports.AccountStatus = exports.Profile = exports.Account = exports.ProfileStats = 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;
8
+ exports.AccountServiceDefinition = exports.ListAccountsResponse = exports.ListAccountsRequest = exports.GetStatusResponse = exports.GetStatusRequest = exports.GetAccountRepostsResponse = exports.GetAccountRepostsRequest = exports.GetAccountLikesResponse = exports.GetAccountLikesRequest = exports.GetAccountMediaResponse = exports.GetAccountMediaRequest = exports.GetAccountRepliesResponse = exports.GetAccountRepliesRequest = exports.GetAccountPostsResponse = exports.GetAccountPostsRequest = exports.GetFollowingResponse = exports.GetFollowingRequest = exports.GetFollowersResponse = exports.GetFollowersRequest = exports.UnfollowUserResponse = exports.UnfollowUserRequest = exports.FollowUserResponse = exports.FollowUserRequest = exports.Representative = exports.OnboardingProgress = exports.AccountStatus = exports.Profile = exports.Account = exports.ProfileStats = 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
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
+ const chat_1 = require("./chat");
11
12
  const common_1 = require("./common");
12
13
  const lookup_1 = require("./lookup");
13
14
  const posts_1 = require("./posts");
@@ -1008,42 +1009,27 @@ exports.OnboardResponse = {
1008
1009
  },
1009
1010
  };
1010
1011
  function createBaseApplyForRepresentativeRequest() {
1011
- return {
1012
- positionId: "",
1013
- constituencyId: "",
1014
- districtId: "",
1015
- partyId: "",
1016
- swornInDate: "",
1017
- bio: "",
1018
- socialHandles: "",
1019
- proofOfOffice: new Uint8Array(0),
1020
- };
1012
+ return { positionId: "", partyId: "", swornInDate: "", bio: "", socialHandles: "", proofOfOffice: new Uint8Array(0) };
1021
1013
  }
1022
1014
  exports.ApplyForRepresentativeRequest = {
1023
1015
  encode(message, writer = new wire_1.BinaryWriter()) {
1024
1016
  if (message.positionId !== "") {
1025
1017
  writer.uint32(10).string(message.positionId);
1026
1018
  }
1027
- if (message.constituencyId !== "") {
1028
- writer.uint32(18).string(message.constituencyId);
1029
- }
1030
- if (message.districtId !== "") {
1031
- writer.uint32(26).string(message.districtId);
1032
- }
1033
1019
  if (message.partyId !== "") {
1034
- writer.uint32(34).string(message.partyId);
1020
+ writer.uint32(18).string(message.partyId);
1035
1021
  }
1036
1022
  if (message.swornInDate !== "") {
1037
- writer.uint32(42).string(message.swornInDate);
1023
+ writer.uint32(26).string(message.swornInDate);
1038
1024
  }
1039
1025
  if (message.bio !== "") {
1040
- writer.uint32(50).string(message.bio);
1026
+ writer.uint32(34).string(message.bio);
1041
1027
  }
1042
1028
  if (message.socialHandles !== "") {
1043
- writer.uint32(58).string(message.socialHandles);
1029
+ writer.uint32(42).string(message.socialHandles);
1044
1030
  }
1045
1031
  if (message.proofOfOffice.length !== 0) {
1046
- writer.uint32(66).bytes(message.proofOfOffice);
1032
+ writer.uint32(50).bytes(message.proofOfOffice);
1047
1033
  }
1048
1034
  return writer;
1049
1035
  },
@@ -1065,48 +1051,34 @@ exports.ApplyForRepresentativeRequest = {
1065
1051
  if (tag !== 18) {
1066
1052
  break;
1067
1053
  }
1068
- message.constituencyId = reader.string();
1054
+ message.partyId = reader.string();
1069
1055
  continue;
1070
1056
  }
1071
1057
  case 3: {
1072
1058
  if (tag !== 26) {
1073
1059
  break;
1074
1060
  }
1075
- message.districtId = reader.string();
1061
+ message.swornInDate = reader.string();
1076
1062
  continue;
1077
1063
  }
1078
1064
  case 4: {
1079
1065
  if (tag !== 34) {
1080
1066
  break;
1081
1067
  }
1082
- message.partyId = reader.string();
1068
+ message.bio = reader.string();
1083
1069
  continue;
1084
1070
  }
1085
1071
  case 5: {
1086
1072
  if (tag !== 42) {
1087
1073
  break;
1088
1074
  }
1089
- message.swornInDate = reader.string();
1075
+ message.socialHandles = reader.string();
1090
1076
  continue;
1091
1077
  }
1092
1078
  case 6: {
1093
1079
  if (tag !== 50) {
1094
1080
  break;
1095
1081
  }
1096
- message.bio = reader.string();
1097
- continue;
1098
- }
1099
- case 7: {
1100
- if (tag !== 58) {
1101
- break;
1102
- }
1103
- message.socialHandles = reader.string();
1104
- continue;
1105
- }
1106
- case 8: {
1107
- if (tag !== 66) {
1108
- break;
1109
- }
1110
1082
  message.proofOfOffice = reader.bytes();
1111
1083
  continue;
1112
1084
  }
@@ -1121,8 +1093,6 @@ exports.ApplyForRepresentativeRequest = {
1121
1093
  fromJSON(object) {
1122
1094
  return {
1123
1095
  positionId: isSet(object.positionId) ? globalThis.String(object.positionId) : "",
1124
- constituencyId: isSet(object.constituencyId) ? globalThis.String(object.constituencyId) : "",
1125
- districtId: isSet(object.districtId) ? globalThis.String(object.districtId) : "",
1126
1096
  partyId: isSet(object.partyId) ? globalThis.String(object.partyId) : "",
1127
1097
  swornInDate: isSet(object.swornInDate) ? globalThis.String(object.swornInDate) : "",
1128
1098
  bio: isSet(object.bio) ? globalThis.String(object.bio) : "",
@@ -1135,12 +1105,6 @@ exports.ApplyForRepresentativeRequest = {
1135
1105
  if (message.positionId !== "") {
1136
1106
  obj.positionId = message.positionId;
1137
1107
  }
1138
- if (message.constituencyId !== "") {
1139
- obj.constituencyId = message.constituencyId;
1140
- }
1141
- if (message.districtId !== "") {
1142
- obj.districtId = message.districtId;
1143
- }
1144
1108
  if (message.partyId !== "") {
1145
1109
  obj.partyId = message.partyId;
1146
1110
  }
@@ -1162,16 +1126,14 @@ exports.ApplyForRepresentativeRequest = {
1162
1126
  return exports.ApplyForRepresentativeRequest.fromPartial(base !== null && base !== void 0 ? base : {});
1163
1127
  },
1164
1128
  fromPartial(object) {
1165
- var _a, _b, _c, _d, _e, _f, _g, _h;
1129
+ var _a, _b, _c, _d, _e, _f;
1166
1130
  const message = createBaseApplyForRepresentativeRequest();
1167
1131
  message.positionId = (_a = object.positionId) !== null && _a !== void 0 ? _a : "";
1168
- message.constituencyId = (_b = object.constituencyId) !== null && _b !== void 0 ? _b : "";
1169
- message.districtId = (_c = object.districtId) !== null && _c !== void 0 ? _c : "";
1170
- message.partyId = (_d = object.partyId) !== null && _d !== void 0 ? _d : "";
1171
- message.swornInDate = (_e = object.swornInDate) !== null && _e !== void 0 ? _e : "";
1172
- message.bio = (_f = object.bio) !== null && _f !== void 0 ? _f : "";
1173
- message.socialHandles = (_g = object.socialHandles) !== null && _g !== void 0 ? _g : "";
1174
- message.proofOfOffice = (_h = object.proofOfOffice) !== null && _h !== void 0 ? _h : new Uint8Array(0);
1132
+ message.partyId = (_b = object.partyId) !== null && _b !== void 0 ? _b : "";
1133
+ message.swornInDate = (_c = object.swornInDate) !== null && _c !== void 0 ? _c : "";
1134
+ message.bio = (_d = object.bio) !== null && _d !== void 0 ? _d : "";
1135
+ message.socialHandles = (_e = object.socialHandles) !== null && _e !== void 0 ? _e : "";
1136
+ message.proofOfOffice = (_f = object.proofOfOffice) !== null && _f !== void 0 ? _f : new Uint8Array(0);
1175
1137
  return message;
1176
1138
  },
1177
1139
  };
@@ -1343,6 +1305,12 @@ function createBaseAccount() {
1343
1305
  isFollowing: false,
1344
1306
  isFollowedBy: false,
1345
1307
  isOwnProfile: false,
1308
+ position: undefined,
1309
+ party: undefined,
1310
+ representativeBio: "",
1311
+ socialHandles: "",
1312
+ approved: false,
1313
+ representativeStatus: "",
1346
1314
  };
1347
1315
  }
1348
1316
  exports.Account = {
@@ -1428,6 +1396,24 @@ exports.Account = {
1428
1396
  if (message.isOwnProfile !== false) {
1429
1397
  writer.uint32(216).bool(message.isOwnProfile);
1430
1398
  }
1399
+ if (message.position !== undefined) {
1400
+ lookup_1.Position.encode(message.position, writer.uint32(226).fork()).join();
1401
+ }
1402
+ if (message.party !== undefined) {
1403
+ lookup_1.Party.encode(message.party, writer.uint32(234).fork()).join();
1404
+ }
1405
+ if (message.representativeBio !== "") {
1406
+ writer.uint32(242).string(message.representativeBio);
1407
+ }
1408
+ if (message.socialHandles !== "") {
1409
+ writer.uint32(250).string(message.socialHandles);
1410
+ }
1411
+ if (message.approved !== false) {
1412
+ writer.uint32(256).bool(message.approved);
1413
+ }
1414
+ if (message.representativeStatus !== "") {
1415
+ writer.uint32(266).string(message.representativeStatus);
1416
+ }
1431
1417
  return writer;
1432
1418
  },
1433
1419
  decode(input, length) {
@@ -1626,6 +1612,48 @@ exports.Account = {
1626
1612
  message.isOwnProfile = reader.bool();
1627
1613
  continue;
1628
1614
  }
1615
+ case 28: {
1616
+ if (tag !== 226) {
1617
+ break;
1618
+ }
1619
+ message.position = lookup_1.Position.decode(reader, reader.uint32());
1620
+ continue;
1621
+ }
1622
+ case 29: {
1623
+ if (tag !== 234) {
1624
+ break;
1625
+ }
1626
+ message.party = lookup_1.Party.decode(reader, reader.uint32());
1627
+ continue;
1628
+ }
1629
+ case 30: {
1630
+ if (tag !== 242) {
1631
+ break;
1632
+ }
1633
+ message.representativeBio = reader.string();
1634
+ continue;
1635
+ }
1636
+ case 31: {
1637
+ if (tag !== 250) {
1638
+ break;
1639
+ }
1640
+ message.socialHandles = reader.string();
1641
+ continue;
1642
+ }
1643
+ case 32: {
1644
+ if (tag !== 256) {
1645
+ break;
1646
+ }
1647
+ message.approved = reader.bool();
1648
+ continue;
1649
+ }
1650
+ case 33: {
1651
+ if (tag !== 266) {
1652
+ break;
1653
+ }
1654
+ message.representativeStatus = reader.string();
1655
+ continue;
1656
+ }
1629
1657
  }
1630
1658
  if ((tag & 7) === 4 || tag === 0) {
1631
1659
  break;
@@ -1663,6 +1691,12 @@ exports.Account = {
1663
1691
  isFollowing: isSet(object.isFollowing) ? globalThis.Boolean(object.isFollowing) : false,
1664
1692
  isFollowedBy: isSet(object.isFollowedBy) ? globalThis.Boolean(object.isFollowedBy) : false,
1665
1693
  isOwnProfile: isSet(object.isOwnProfile) ? globalThis.Boolean(object.isOwnProfile) : false,
1694
+ position: isSet(object.position) ? lookup_1.Position.fromJSON(object.position) : undefined,
1695
+ party: isSet(object.party) ? lookup_1.Party.fromJSON(object.party) : undefined,
1696
+ representativeBio: isSet(object.representativeBio) ? globalThis.String(object.representativeBio) : "",
1697
+ socialHandles: isSet(object.socialHandles) ? globalThis.String(object.socialHandles) : "",
1698
+ approved: isSet(object.approved) ? globalThis.Boolean(object.approved) : false,
1699
+ representativeStatus: isSet(object.representativeStatus) ? globalThis.String(object.representativeStatus) : "",
1666
1700
  };
1667
1701
  },
1668
1702
  toJSON(message) {
@@ -1748,13 +1782,31 @@ exports.Account = {
1748
1782
  if (message.isOwnProfile !== false) {
1749
1783
  obj.isOwnProfile = message.isOwnProfile;
1750
1784
  }
1785
+ if (message.position !== undefined) {
1786
+ obj.position = lookup_1.Position.toJSON(message.position);
1787
+ }
1788
+ if (message.party !== undefined) {
1789
+ obj.party = lookup_1.Party.toJSON(message.party);
1790
+ }
1791
+ if (message.representativeBio !== "") {
1792
+ obj.representativeBio = message.representativeBio;
1793
+ }
1794
+ if (message.socialHandles !== "") {
1795
+ obj.socialHandles = message.socialHandles;
1796
+ }
1797
+ if (message.approved !== false) {
1798
+ obj.approved = message.approved;
1799
+ }
1800
+ if (message.representativeStatus !== "") {
1801
+ obj.representativeStatus = message.representativeStatus;
1802
+ }
1751
1803
  return obj;
1752
1804
  },
1753
1805
  create(base) {
1754
1806
  return exports.Account.fromPartial(base !== null && base !== void 0 ? base : {});
1755
1807
  },
1756
1808
  fromPartial(object) {
1757
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
1809
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
1758
1810
  const message = createBaseAccount();
1759
1811
  message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
1760
1812
  message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
@@ -1791,11 +1843,28 @@ exports.Account = {
1791
1843
  message.isFollowing = (_v = object.isFollowing) !== null && _v !== void 0 ? _v : false;
1792
1844
  message.isFollowedBy = (_w = object.isFollowedBy) !== null && _w !== void 0 ? _w : false;
1793
1845
  message.isOwnProfile = (_x = object.isOwnProfile) !== null && _x !== void 0 ? _x : false;
1846
+ message.position = (object.position !== undefined && object.position !== null)
1847
+ ? lookup_1.Position.fromPartial(object.position)
1848
+ : undefined;
1849
+ message.party = (object.party !== undefined && object.party !== null) ? lookup_1.Party.fromPartial(object.party) : undefined;
1850
+ message.representativeBio = (_y = object.representativeBio) !== null && _y !== void 0 ? _y : "";
1851
+ message.socialHandles = (_z = object.socialHandles) !== null && _z !== void 0 ? _z : "";
1852
+ message.approved = (_0 = object.approved) !== null && _0 !== void 0 ? _0 : false;
1853
+ message.representativeStatus = (_1 = object.representativeStatus) !== null && _1 !== void 0 ? _1 : "";
1794
1854
  return message;
1795
1855
  },
1796
1856
  };
1797
1857
  function createBaseProfile() {
1798
- return { user: undefined, stats: undefined, posts: [], replies: [], media: [], likes: [] };
1858
+ return {
1859
+ user: undefined,
1860
+ stats: undefined,
1861
+ posts: [],
1862
+ replies: [],
1863
+ media: [],
1864
+ likes: [],
1865
+ preferences: [],
1866
+ settings: [],
1867
+ };
1799
1868
  }
1800
1869
  exports.Profile = {
1801
1870
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -1817,6 +1886,12 @@ exports.Profile = {
1817
1886
  for (const v of message.likes) {
1818
1887
  posts_1.Post.encode(v, writer.uint32(50).fork()).join();
1819
1888
  }
1889
+ for (const v of message.preferences) {
1890
+ chat_1.UserPreference.encode(v, writer.uint32(58).fork()).join();
1891
+ }
1892
+ for (const v of message.settings) {
1893
+ chat_1.Setting.encode(v, writer.uint32(66).fork()).join();
1894
+ }
1820
1895
  return writer;
1821
1896
  },
1822
1897
  decode(input, length) {
@@ -1868,6 +1943,20 @@ exports.Profile = {
1868
1943
  message.likes.push(posts_1.Post.decode(reader, reader.uint32()));
1869
1944
  continue;
1870
1945
  }
1946
+ case 7: {
1947
+ if (tag !== 58) {
1948
+ break;
1949
+ }
1950
+ message.preferences.push(chat_1.UserPreference.decode(reader, reader.uint32()));
1951
+ continue;
1952
+ }
1953
+ case 8: {
1954
+ if (tag !== 66) {
1955
+ break;
1956
+ }
1957
+ message.settings.push(chat_1.Setting.decode(reader, reader.uint32()));
1958
+ continue;
1959
+ }
1871
1960
  }
1872
1961
  if ((tag & 7) === 4 || tag === 0) {
1873
1962
  break;
@@ -1884,10 +1973,14 @@ exports.Profile = {
1884
1973
  replies: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.replies) ? object.replies.map((e) => posts_1.Post.fromJSON(e)) : [],
1885
1974
  media: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.media) ? object.media.map((e) => posts_1.Post.fromJSON(e)) : [],
1886
1975
  likes: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.likes) ? object.likes.map((e) => posts_1.Post.fromJSON(e)) : [],
1976
+ preferences: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.preferences)
1977
+ ? object.preferences.map((e) => chat_1.UserPreference.fromJSON(e))
1978
+ : [],
1979
+ settings: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.settings) ? object.settings.map((e) => chat_1.Setting.fromJSON(e)) : [],
1887
1980
  };
1888
1981
  },
1889
1982
  toJSON(message) {
1890
- var _a, _b, _c, _d;
1983
+ var _a, _b, _c, _d, _e, _f;
1891
1984
  const obj = {};
1892
1985
  if (message.user !== undefined) {
1893
1986
  obj.user = exports.Account.toJSON(message.user);
@@ -1907,13 +2000,19 @@ exports.Profile = {
1907
2000
  if ((_d = message.likes) === null || _d === void 0 ? void 0 : _d.length) {
1908
2001
  obj.likes = message.likes.map((e) => posts_1.Post.toJSON(e));
1909
2002
  }
2003
+ if ((_e = message.preferences) === null || _e === void 0 ? void 0 : _e.length) {
2004
+ obj.preferences = message.preferences.map((e) => chat_1.UserPreference.toJSON(e));
2005
+ }
2006
+ if ((_f = message.settings) === null || _f === void 0 ? void 0 : _f.length) {
2007
+ obj.settings = message.settings.map((e) => chat_1.Setting.toJSON(e));
2008
+ }
1910
2009
  return obj;
1911
2010
  },
1912
2011
  create(base) {
1913
2012
  return exports.Profile.fromPartial(base !== null && base !== void 0 ? base : {});
1914
2013
  },
1915
2014
  fromPartial(object) {
1916
- var _a, _b, _c, _d;
2015
+ var _a, _b, _c, _d, _e, _f;
1917
2016
  const message = createBaseProfile();
1918
2017
  message.user = (object.user !== undefined && object.user !== null) ? exports.Account.fromPartial(object.user) : undefined;
1919
2018
  message.stats = (object.stats !== undefined && object.stats !== null)
@@ -1923,6 +2022,8 @@ exports.Profile = {
1923
2022
  message.replies = ((_b = object.replies) === null || _b === void 0 ? void 0 : _b.map((e) => posts_1.Post.fromPartial(e))) || [];
1924
2023
  message.media = ((_c = object.media) === null || _c === void 0 ? void 0 : _c.map((e) => posts_1.Post.fromPartial(e))) || [];
1925
2024
  message.likes = ((_d = object.likes) === null || _d === void 0 ? void 0 : _d.map((e) => posts_1.Post.fromPartial(e))) || [];
2025
+ message.preferences = ((_e = object.preferences) === null || _e === void 0 ? void 0 : _e.map((e) => chat_1.UserPreference.fromPartial(e))) || [];
2026
+ message.settings = ((_f = object.settings) === null || _f === void 0 ? void 0 : _f.map((e) => chat_1.Setting.fromPartial(e))) || [];
1926
2027
  return message;
1927
2028
  },
1928
2029
  };
@@ -1933,8 +2034,14 @@ function createBaseAccountStatus() {
1933
2034
  kyced: false,
1934
2035
  status: "",
1935
2036
  isRepresentative: false,
1936
- representative: undefined,
2037
+ position: undefined,
2038
+ party: undefined,
2039
+ representativeBio: "",
2040
+ socialHandles: "",
2041
+ approved: false,
2042
+ representativeStatus: "",
1937
2043
  onboardingProgress: undefined,
2044
+ swornIn: "",
1938
2045
  };
1939
2046
  }
1940
2047
  exports.AccountStatus = {
@@ -1954,11 +2061,29 @@ exports.AccountStatus = {
1954
2061
  if (message.isRepresentative !== false) {
1955
2062
  writer.uint32(40).bool(message.isRepresentative);
1956
2063
  }
1957
- if (message.representative !== undefined) {
1958
- exports.Representative.encode(message.representative, writer.uint32(50).fork()).join();
2064
+ if (message.position !== undefined) {
2065
+ lookup_1.Position.encode(message.position, writer.uint32(50).fork()).join();
2066
+ }
2067
+ if (message.party !== undefined) {
2068
+ lookup_1.Party.encode(message.party, writer.uint32(58).fork()).join();
2069
+ }
2070
+ if (message.representativeBio !== "") {
2071
+ writer.uint32(66).string(message.representativeBio);
2072
+ }
2073
+ if (message.socialHandles !== "") {
2074
+ writer.uint32(74).string(message.socialHandles);
2075
+ }
2076
+ if (message.approved !== false) {
2077
+ writer.uint32(80).bool(message.approved);
2078
+ }
2079
+ if (message.representativeStatus !== "") {
2080
+ writer.uint32(90).string(message.representativeStatus);
1959
2081
  }
1960
2082
  if (message.onboardingProgress !== undefined) {
1961
- exports.OnboardingProgress.encode(message.onboardingProgress, writer.uint32(58).fork()).join();
2083
+ exports.OnboardingProgress.encode(message.onboardingProgress, writer.uint32(98).fork()).join();
2084
+ }
2085
+ if (message.swornIn !== "") {
2086
+ writer.uint32(106).string(message.swornIn);
1962
2087
  }
1963
2088
  return writer;
1964
2089
  },
@@ -2008,16 +2133,58 @@ exports.AccountStatus = {
2008
2133
  if (tag !== 50) {
2009
2134
  break;
2010
2135
  }
2011
- message.representative = exports.Representative.decode(reader, reader.uint32());
2136
+ message.position = lookup_1.Position.decode(reader, reader.uint32());
2012
2137
  continue;
2013
2138
  }
2014
2139
  case 7: {
2015
2140
  if (tag !== 58) {
2016
2141
  break;
2017
2142
  }
2143
+ message.party = lookup_1.Party.decode(reader, reader.uint32());
2144
+ continue;
2145
+ }
2146
+ case 8: {
2147
+ if (tag !== 66) {
2148
+ break;
2149
+ }
2150
+ message.representativeBio = reader.string();
2151
+ continue;
2152
+ }
2153
+ case 9: {
2154
+ if (tag !== 74) {
2155
+ break;
2156
+ }
2157
+ message.socialHandles = reader.string();
2158
+ continue;
2159
+ }
2160
+ case 10: {
2161
+ if (tag !== 80) {
2162
+ break;
2163
+ }
2164
+ message.approved = reader.bool();
2165
+ continue;
2166
+ }
2167
+ case 11: {
2168
+ if (tag !== 90) {
2169
+ break;
2170
+ }
2171
+ message.representativeStatus = reader.string();
2172
+ continue;
2173
+ }
2174
+ case 12: {
2175
+ if (tag !== 98) {
2176
+ break;
2177
+ }
2018
2178
  message.onboardingProgress = exports.OnboardingProgress.decode(reader, reader.uint32());
2019
2179
  continue;
2020
2180
  }
2181
+ case 13: {
2182
+ if (tag !== 106) {
2183
+ break;
2184
+ }
2185
+ message.swornIn = reader.string();
2186
+ continue;
2187
+ }
2021
2188
  }
2022
2189
  if ((tag & 7) === 4 || tag === 0) {
2023
2190
  break;
@@ -2033,10 +2200,16 @@ exports.AccountStatus = {
2033
2200
  kyced: isSet(object.kyced) ? globalThis.Boolean(object.kyced) : false,
2034
2201
  status: isSet(object.status) ? globalThis.String(object.status) : "",
2035
2202
  isRepresentative: isSet(object.isRepresentative) ? globalThis.Boolean(object.isRepresentative) : false,
2036
- representative: isSet(object.representative) ? exports.Representative.fromJSON(object.representative) : undefined,
2203
+ position: isSet(object.position) ? lookup_1.Position.fromJSON(object.position) : undefined,
2204
+ party: isSet(object.party) ? lookup_1.Party.fromJSON(object.party) : undefined,
2205
+ representativeBio: isSet(object.representativeBio) ? globalThis.String(object.representativeBio) : "",
2206
+ socialHandles: isSet(object.socialHandles) ? globalThis.String(object.socialHandles) : "",
2207
+ approved: isSet(object.approved) ? globalThis.Boolean(object.approved) : false,
2208
+ representativeStatus: isSet(object.representativeStatus) ? globalThis.String(object.representativeStatus) : "",
2037
2209
  onboardingProgress: isSet(object.onboardingProgress)
2038
2210
  ? exports.OnboardingProgress.fromJSON(object.onboardingProgress)
2039
2211
  : undefined,
2212
+ swornIn: isSet(object.swornIn) ? globalThis.String(object.swornIn) : "",
2040
2213
  };
2041
2214
  },
2042
2215
  toJSON(message) {
@@ -2056,31 +2229,55 @@ exports.AccountStatus = {
2056
2229
  if (message.isRepresentative !== false) {
2057
2230
  obj.isRepresentative = message.isRepresentative;
2058
2231
  }
2059
- if (message.representative !== undefined) {
2060
- obj.representative = exports.Representative.toJSON(message.representative);
2232
+ if (message.position !== undefined) {
2233
+ obj.position = lookup_1.Position.toJSON(message.position);
2234
+ }
2235
+ if (message.party !== undefined) {
2236
+ obj.party = lookup_1.Party.toJSON(message.party);
2237
+ }
2238
+ if (message.representativeBio !== "") {
2239
+ obj.representativeBio = message.representativeBio;
2240
+ }
2241
+ if (message.socialHandles !== "") {
2242
+ obj.socialHandles = message.socialHandles;
2243
+ }
2244
+ if (message.approved !== false) {
2245
+ obj.approved = message.approved;
2246
+ }
2247
+ if (message.representativeStatus !== "") {
2248
+ obj.representativeStatus = message.representativeStatus;
2061
2249
  }
2062
2250
  if (message.onboardingProgress !== undefined) {
2063
2251
  obj.onboardingProgress = exports.OnboardingProgress.toJSON(message.onboardingProgress);
2064
2252
  }
2253
+ if (message.swornIn !== "") {
2254
+ obj.swornIn = message.swornIn;
2255
+ }
2065
2256
  return obj;
2066
2257
  },
2067
2258
  create(base) {
2068
2259
  return exports.AccountStatus.fromPartial(base !== null && base !== void 0 ? base : {});
2069
2260
  },
2070
2261
  fromPartial(object) {
2071
- var _a, _b, _c, _d, _e;
2262
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
2072
2263
  const message = createBaseAccountStatus();
2073
2264
  message.emailVerified = (_a = object.emailVerified) !== null && _a !== void 0 ? _a : false;
2074
2265
  message.onboarded = (_b = object.onboarded) !== null && _b !== void 0 ? _b : false;
2075
2266
  message.kyced = (_c = object.kyced) !== null && _c !== void 0 ? _c : false;
2076
2267
  message.status = (_d = object.status) !== null && _d !== void 0 ? _d : "";
2077
2268
  message.isRepresentative = (_e = object.isRepresentative) !== null && _e !== void 0 ? _e : false;
2078
- message.representative = (object.representative !== undefined && object.representative !== null)
2079
- ? exports.Representative.fromPartial(object.representative)
2269
+ message.position = (object.position !== undefined && object.position !== null)
2270
+ ? lookup_1.Position.fromPartial(object.position)
2080
2271
  : undefined;
2272
+ message.party = (object.party !== undefined && object.party !== null) ? lookup_1.Party.fromPartial(object.party) : undefined;
2273
+ message.representativeBio = (_f = object.representativeBio) !== null && _f !== void 0 ? _f : "";
2274
+ message.socialHandles = (_g = object.socialHandles) !== null && _g !== void 0 ? _g : "";
2275
+ message.approved = (_h = object.approved) !== null && _h !== void 0 ? _h : false;
2276
+ message.representativeStatus = (_j = object.representativeStatus) !== null && _j !== void 0 ? _j : "";
2081
2277
  message.onboardingProgress = (object.onboardingProgress !== undefined && object.onboardingProgress !== null)
2082
2278
  ? exports.OnboardingProgress.fromPartial(object.onboardingProgress)
2083
2279
  : undefined;
2280
+ message.swornIn = (_k = object.swornIn) !== null && _k !== void 0 ? _k : "";
2084
2281
  return message;
2085
2282
  },
2086
2283
  };
@@ -4049,6 +4246,280 @@ exports.GetStatusResponse = {
4049
4246
  return message;
4050
4247
  },
4051
4248
  };
4249
+ function createBaseListAccountsRequest() {
4250
+ return {
4251
+ base: undefined,
4252
+ query: "",
4253
+ accountTypeId: "",
4254
+ stateId: "",
4255
+ localGovernmentId: "",
4256
+ constituencyId: "",
4257
+ districtId: "",
4258
+ positionId: "",
4259
+ partyId: "",
4260
+ status: "",
4261
+ };
4262
+ }
4263
+ exports.ListAccountsRequest = {
4264
+ encode(message, writer = new wire_1.BinaryWriter()) {
4265
+ if (message.base !== undefined) {
4266
+ common_1.BaseListRequest.encode(message.base, writer.uint32(10).fork()).join();
4267
+ }
4268
+ if (message.query !== "") {
4269
+ writer.uint32(18).string(message.query);
4270
+ }
4271
+ if (message.accountTypeId !== "") {
4272
+ writer.uint32(26).string(message.accountTypeId);
4273
+ }
4274
+ if (message.stateId !== "") {
4275
+ writer.uint32(34).string(message.stateId);
4276
+ }
4277
+ if (message.localGovernmentId !== "") {
4278
+ writer.uint32(42).string(message.localGovernmentId);
4279
+ }
4280
+ if (message.constituencyId !== "") {
4281
+ writer.uint32(50).string(message.constituencyId);
4282
+ }
4283
+ if (message.districtId !== "") {
4284
+ writer.uint32(58).string(message.districtId);
4285
+ }
4286
+ if (message.positionId !== "") {
4287
+ writer.uint32(66).string(message.positionId);
4288
+ }
4289
+ if (message.partyId !== "") {
4290
+ writer.uint32(74).string(message.partyId);
4291
+ }
4292
+ if (message.status !== "") {
4293
+ writer.uint32(82).string(message.status);
4294
+ }
4295
+ return writer;
4296
+ },
4297
+ decode(input, length) {
4298
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
4299
+ const end = length === undefined ? reader.len : reader.pos + length;
4300
+ const message = createBaseListAccountsRequest();
4301
+ while (reader.pos < end) {
4302
+ const tag = reader.uint32();
4303
+ switch (tag >>> 3) {
4304
+ case 1: {
4305
+ if (tag !== 10) {
4306
+ break;
4307
+ }
4308
+ message.base = common_1.BaseListRequest.decode(reader, reader.uint32());
4309
+ continue;
4310
+ }
4311
+ case 2: {
4312
+ if (tag !== 18) {
4313
+ break;
4314
+ }
4315
+ message.query = reader.string();
4316
+ continue;
4317
+ }
4318
+ case 3: {
4319
+ if (tag !== 26) {
4320
+ break;
4321
+ }
4322
+ message.accountTypeId = reader.string();
4323
+ continue;
4324
+ }
4325
+ case 4: {
4326
+ if (tag !== 34) {
4327
+ break;
4328
+ }
4329
+ message.stateId = reader.string();
4330
+ continue;
4331
+ }
4332
+ case 5: {
4333
+ if (tag !== 42) {
4334
+ break;
4335
+ }
4336
+ message.localGovernmentId = reader.string();
4337
+ continue;
4338
+ }
4339
+ case 6: {
4340
+ if (tag !== 50) {
4341
+ break;
4342
+ }
4343
+ message.constituencyId = reader.string();
4344
+ continue;
4345
+ }
4346
+ case 7: {
4347
+ if (tag !== 58) {
4348
+ break;
4349
+ }
4350
+ message.districtId = reader.string();
4351
+ continue;
4352
+ }
4353
+ case 8: {
4354
+ if (tag !== 66) {
4355
+ break;
4356
+ }
4357
+ message.positionId = reader.string();
4358
+ continue;
4359
+ }
4360
+ case 9: {
4361
+ if (tag !== 74) {
4362
+ break;
4363
+ }
4364
+ message.partyId = reader.string();
4365
+ continue;
4366
+ }
4367
+ case 10: {
4368
+ if (tag !== 82) {
4369
+ break;
4370
+ }
4371
+ message.status = reader.string();
4372
+ continue;
4373
+ }
4374
+ }
4375
+ if ((tag & 7) === 4 || tag === 0) {
4376
+ break;
4377
+ }
4378
+ reader.skip(tag & 7);
4379
+ }
4380
+ return message;
4381
+ },
4382
+ fromJSON(object) {
4383
+ return {
4384
+ base: isSet(object.base) ? common_1.BaseListRequest.fromJSON(object.base) : undefined,
4385
+ query: isSet(object.query) ? globalThis.String(object.query) : "",
4386
+ accountTypeId: isSet(object.accountTypeId) ? globalThis.String(object.accountTypeId) : "",
4387
+ stateId: isSet(object.stateId) ? globalThis.String(object.stateId) : "",
4388
+ localGovernmentId: isSet(object.localGovernmentId) ? globalThis.String(object.localGovernmentId) : "",
4389
+ constituencyId: isSet(object.constituencyId) ? globalThis.String(object.constituencyId) : "",
4390
+ districtId: isSet(object.districtId) ? globalThis.String(object.districtId) : "",
4391
+ positionId: isSet(object.positionId) ? globalThis.String(object.positionId) : "",
4392
+ partyId: isSet(object.partyId) ? globalThis.String(object.partyId) : "",
4393
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
4394
+ };
4395
+ },
4396
+ toJSON(message) {
4397
+ const obj = {};
4398
+ if (message.base !== undefined) {
4399
+ obj.base = common_1.BaseListRequest.toJSON(message.base);
4400
+ }
4401
+ if (message.query !== "") {
4402
+ obj.query = message.query;
4403
+ }
4404
+ if (message.accountTypeId !== "") {
4405
+ obj.accountTypeId = message.accountTypeId;
4406
+ }
4407
+ if (message.stateId !== "") {
4408
+ obj.stateId = message.stateId;
4409
+ }
4410
+ if (message.localGovernmentId !== "") {
4411
+ obj.localGovernmentId = message.localGovernmentId;
4412
+ }
4413
+ if (message.constituencyId !== "") {
4414
+ obj.constituencyId = message.constituencyId;
4415
+ }
4416
+ if (message.districtId !== "") {
4417
+ obj.districtId = message.districtId;
4418
+ }
4419
+ if (message.positionId !== "") {
4420
+ obj.positionId = message.positionId;
4421
+ }
4422
+ if (message.partyId !== "") {
4423
+ obj.partyId = message.partyId;
4424
+ }
4425
+ if (message.status !== "") {
4426
+ obj.status = message.status;
4427
+ }
4428
+ return obj;
4429
+ },
4430
+ create(base) {
4431
+ return exports.ListAccountsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
4432
+ },
4433
+ fromPartial(object) {
4434
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
4435
+ const message = createBaseListAccountsRequest();
4436
+ message.base = (object.base !== undefined && object.base !== null)
4437
+ ? common_1.BaseListRequest.fromPartial(object.base)
4438
+ : undefined;
4439
+ message.query = (_a = object.query) !== null && _a !== void 0 ? _a : "";
4440
+ message.accountTypeId = (_b = object.accountTypeId) !== null && _b !== void 0 ? _b : "";
4441
+ message.stateId = (_c = object.stateId) !== null && _c !== void 0 ? _c : "";
4442
+ message.localGovernmentId = (_d = object.localGovernmentId) !== null && _d !== void 0 ? _d : "";
4443
+ message.constituencyId = (_e = object.constituencyId) !== null && _e !== void 0 ? _e : "";
4444
+ message.districtId = (_f = object.districtId) !== null && _f !== void 0 ? _f : "";
4445
+ message.positionId = (_g = object.positionId) !== null && _g !== void 0 ? _g : "";
4446
+ message.partyId = (_h = object.partyId) !== null && _h !== void 0 ? _h : "";
4447
+ message.status = (_j = object.status) !== null && _j !== void 0 ? _j : "";
4448
+ return message;
4449
+ },
4450
+ };
4451
+ function createBaseListAccountsResponse() {
4452
+ return { accounts: [], metadata: undefined };
4453
+ }
4454
+ exports.ListAccountsResponse = {
4455
+ encode(message, writer = new wire_1.BinaryWriter()) {
4456
+ for (const v of message.accounts) {
4457
+ exports.Account.encode(v, writer.uint32(10).fork()).join();
4458
+ }
4459
+ if (message.metadata !== undefined) {
4460
+ common_1.Metadata.encode(message.metadata, writer.uint32(18).fork()).join();
4461
+ }
4462
+ return writer;
4463
+ },
4464
+ decode(input, length) {
4465
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
4466
+ const end = length === undefined ? reader.len : reader.pos + length;
4467
+ const message = createBaseListAccountsResponse();
4468
+ while (reader.pos < end) {
4469
+ const tag = reader.uint32();
4470
+ switch (tag >>> 3) {
4471
+ case 1: {
4472
+ if (tag !== 10) {
4473
+ break;
4474
+ }
4475
+ message.accounts.push(exports.Account.decode(reader, reader.uint32()));
4476
+ continue;
4477
+ }
4478
+ case 2: {
4479
+ if (tag !== 18) {
4480
+ break;
4481
+ }
4482
+ message.metadata = common_1.Metadata.decode(reader, reader.uint32());
4483
+ continue;
4484
+ }
4485
+ }
4486
+ if ((tag & 7) === 4 || tag === 0) {
4487
+ break;
4488
+ }
4489
+ reader.skip(tag & 7);
4490
+ }
4491
+ return message;
4492
+ },
4493
+ fromJSON(object) {
4494
+ return {
4495
+ accounts: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.accounts) ? object.accounts.map((e) => exports.Account.fromJSON(e)) : [],
4496
+ metadata: isSet(object.metadata) ? common_1.Metadata.fromJSON(object.metadata) : undefined,
4497
+ };
4498
+ },
4499
+ toJSON(message) {
4500
+ var _a;
4501
+ const obj = {};
4502
+ if ((_a = message.accounts) === null || _a === void 0 ? void 0 : _a.length) {
4503
+ obj.accounts = message.accounts.map((e) => exports.Account.toJSON(e));
4504
+ }
4505
+ if (message.metadata !== undefined) {
4506
+ obj.metadata = common_1.Metadata.toJSON(message.metadata);
4507
+ }
4508
+ return obj;
4509
+ },
4510
+ create(base) {
4511
+ return exports.ListAccountsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
4512
+ },
4513
+ fromPartial(object) {
4514
+ var _a;
4515
+ const message = createBaseListAccountsResponse();
4516
+ message.accounts = ((_a = object.accounts) === null || _a === void 0 ? void 0 : _a.map((e) => exports.Account.fromPartial(e))) || [];
4517
+ message.metadata = (object.metadata !== undefined && object.metadata !== null)
4518
+ ? common_1.Metadata.fromPartial(object.metadata)
4519
+ : undefined;
4520
+ return message;
4521
+ },
4522
+ };
4052
4523
  exports.AccountServiceDefinition = {
4053
4524
  name: "AccountService",
4054
4525
  fullName: "pb.AccountService",
@@ -4752,6 +5223,20 @@ exports.AccountServiceDefinition = {
4752
5223
  },
4753
5224
  },
4754
5225
  },
5226
+ listAccounts: {
5227
+ name: "ListAccounts",
5228
+ requestType: exports.ListAccountsRequest,
5229
+ requestStream: false,
5230
+ responseType: exports.ListAccountsResponse,
5231
+ responseStream: false,
5232
+ options: {
5233
+ _unknownFields: {
5234
+ 578365826: [
5235
+ new Uint8Array([18, 18, 16, 47, 97, 112, 105, 47, 118, 49, 47, 97, 99, 99, 111, 117, 110, 116, 115]),
5236
+ ],
5237
+ },
5238
+ },
5239
+ },
4755
5240
  },
4756
5241
  };
4757
5242
  function bytesFromBase64(b64) {