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,229 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { DeleteResponse } from "./common";
3
+ export declare const protobufPackage = "pb";
4
+ export interface GetProfileRequest {
5
+ accountId: string;
6
+ }
7
+ export interface GetProfileResponse {
8
+ account: Account | undefined;
9
+ }
10
+ export interface UpdateProfileRequest {
11
+ name: string;
12
+ phoneNumber: string;
13
+ gender: string;
14
+ dob: string;
15
+ location: string;
16
+ stateId: string;
17
+ localGovernmentId: string;
18
+ pollingUnit: string;
19
+ }
20
+ export interface UpdateProfileResponse {
21
+ account: Account | undefined;
22
+ }
23
+ export interface UpdatePasswordRequest {
24
+ oldPassword: string;
25
+ newPassword: string;
26
+ confirmPassword: string;
27
+ }
28
+ export interface UploadPhotoRequest {
29
+ type: string;
30
+ photoData: Uint8Array;
31
+ contentType: string;
32
+ }
33
+ export interface UploadPhotoResponse {
34
+ photoUrl: string;
35
+ }
36
+ export interface OnboardRequest {
37
+ name: string;
38
+ phoneNumber: string;
39
+ gender: string;
40
+ dob: string;
41
+ location: string;
42
+ stateId: string;
43
+ localGovernmentId: string;
44
+ pollingUnit: string;
45
+ kycData: Uint8Array;
46
+ }
47
+ export interface OnboardResponse {
48
+ account: Account | undefined;
49
+ }
50
+ export interface ApplyForRepresentativeRequest {
51
+ positionId: string;
52
+ constituencyId: string;
53
+ districtId: string;
54
+ partyId: string;
55
+ swornInDate: string;
56
+ bio: string;
57
+ socialHandles: string;
58
+ proofOfOffice: Uint8Array;
59
+ }
60
+ export interface ApplyForRepresentativeResponse {
61
+ representative: Representative | undefined;
62
+ }
63
+ export interface Account {
64
+ id: string;
65
+ name: string;
66
+ email: string;
67
+ photoUrl: string;
68
+ coverPhotoUrl: string;
69
+ phoneNumber: string;
70
+ gender: string;
71
+ dob: string;
72
+ location: string;
73
+ stateId: string;
74
+ localGovernmentId: string;
75
+ accountTypeId: string;
76
+ pollingUnit: string;
77
+ emailVerified: boolean;
78
+ status: string;
79
+ kyced: boolean;
80
+ createdAt: string;
81
+ updatedAt: string;
82
+ }
83
+ export interface AccountStatus {
84
+ emailVerified: boolean;
85
+ onboarded: boolean;
86
+ kyced: boolean;
87
+ status: string;
88
+ isRepresentative: boolean;
89
+ representative: Representative | undefined;
90
+ onboardingProgress: OnboardingProgress | undefined;
91
+ }
92
+ export interface OnboardingProgress {
93
+ completedSteps: number;
94
+ totalSteps: number;
95
+ hasName: boolean;
96
+ hasPhoneNumber: boolean;
97
+ hasGender: boolean;
98
+ hasDob: boolean;
99
+ hasLocation: boolean;
100
+ hasState: boolean;
101
+ hasPollingUnit: boolean;
102
+ }
103
+ export interface Representative {
104
+ id: string;
105
+ accountId: string;
106
+ positionId: string;
107
+ constituencyId: string;
108
+ districtId: string;
109
+ partyId: string;
110
+ swornInDate: string;
111
+ bio: string;
112
+ socialHandles: string;
113
+ approved: boolean;
114
+ status: string;
115
+ }
116
+ export declare const GetProfileRequest: MessageFns<GetProfileRequest>;
117
+ export declare const GetProfileResponse: MessageFns<GetProfileResponse>;
118
+ export declare const UpdateProfileRequest: MessageFns<UpdateProfileRequest>;
119
+ export declare const UpdateProfileResponse: MessageFns<UpdateProfileResponse>;
120
+ export declare const UpdatePasswordRequest: MessageFns<UpdatePasswordRequest>;
121
+ export declare const UploadPhotoRequest: MessageFns<UploadPhotoRequest>;
122
+ export declare const UploadPhotoResponse: MessageFns<UploadPhotoResponse>;
123
+ export declare const OnboardRequest: MessageFns<OnboardRequest>;
124
+ export declare const OnboardResponse: MessageFns<OnboardResponse>;
125
+ export declare const ApplyForRepresentativeRequest: MessageFns<ApplyForRepresentativeRequest>;
126
+ export declare const ApplyForRepresentativeResponse: MessageFns<ApplyForRepresentativeResponse>;
127
+ export declare const Account: MessageFns<Account>;
128
+ export declare const AccountStatus: MessageFns<AccountStatus>;
129
+ export declare const OnboardingProgress: MessageFns<OnboardingProgress>;
130
+ export declare const Representative: MessageFns<Representative>;
131
+ /** Account Service */
132
+ export type AccountServiceDefinition = typeof AccountServiceDefinition;
133
+ export declare const AccountServiceDefinition: {
134
+ readonly name: "AccountService";
135
+ readonly fullName: "pb.AccountService";
136
+ readonly methods: {
137
+ readonly getProfile: {
138
+ readonly name: "GetProfile";
139
+ readonly requestType: MessageFns<GetProfileRequest>;
140
+ readonly requestStream: false;
141
+ readonly responseType: MessageFns<GetProfileResponse>;
142
+ readonly responseStream: false;
143
+ readonly options: {
144
+ readonly _unknownFields: {
145
+ readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
146
+ };
147
+ };
148
+ };
149
+ readonly updateProfile: {
150
+ readonly name: "UpdateProfile";
151
+ readonly requestType: MessageFns<UpdateProfileRequest>;
152
+ readonly requestStream: false;
153
+ readonly responseType: MessageFns<UpdateProfileResponse>;
154
+ readonly responseStream: false;
155
+ readonly options: {
156
+ readonly _unknownFields: {
157
+ readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
158
+ };
159
+ };
160
+ };
161
+ readonly updatePassword: {
162
+ readonly name: "UpdatePassword";
163
+ readonly requestType: MessageFns<UpdatePasswordRequest>;
164
+ readonly requestStream: false;
165
+ readonly responseType: import("./common").MessageFns<DeleteResponse>;
166
+ readonly responseStream: false;
167
+ readonly options: {
168
+ readonly _unknownFields: {
169
+ readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
170
+ };
171
+ };
172
+ };
173
+ readonly uploadPhoto: {
174
+ readonly name: "UploadPhoto";
175
+ readonly requestType: MessageFns<UploadPhotoRequest>;
176
+ readonly requestStream: false;
177
+ readonly responseType: MessageFns<UploadPhotoResponse>;
178
+ readonly responseStream: false;
179
+ readonly options: {
180
+ readonly _unknownFields: {
181
+ readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
182
+ };
183
+ };
184
+ };
185
+ readonly onboard: {
186
+ readonly name: "Onboard";
187
+ readonly requestType: MessageFns<OnboardRequest>;
188
+ readonly requestStream: false;
189
+ readonly responseType: MessageFns<OnboardResponse>;
190
+ readonly responseStream: false;
191
+ readonly options: {
192
+ readonly _unknownFields: {
193
+ readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
194
+ };
195
+ };
196
+ };
197
+ readonly applyForRepresentative: {
198
+ readonly name: "ApplyForRepresentative";
199
+ readonly requestType: MessageFns<ApplyForRepresentativeRequest>;
200
+ readonly requestStream: false;
201
+ readonly responseType: MessageFns<ApplyForRepresentativeResponse>;
202
+ readonly responseStream: false;
203
+ readonly options: {
204
+ readonly _unknownFields: {
205
+ readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
206
+ };
207
+ };
208
+ };
209
+ };
210
+ };
211
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
212
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
213
+ [K in keyof T]?: DeepPartial<T[K]>;
214
+ } : Partial<T>;
215
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
216
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
217
+ [K in keyof P]: Exact<P[K], I[K]>;
218
+ } & {
219
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
220
+ };
221
+ export interface MessageFns<T> {
222
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
223
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
224
+ fromJSON(object: any): T;
225
+ toJSON(message: T): unknown;
226
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
227
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
228
+ }
229
+ export {};