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.
- package/dist/account.d.ts +229 -0
- package/dist/account.js +2211 -0
- package/dist/admin.d.ts +49 -0
- package/dist/admin.js +164 -0
- package/dist/auth.d.ts +242 -0
- package/dist/auth.js +1750 -0
- package/dist/chat.d.ts +49 -0
- package/dist/chat.js +163 -0
- package/dist/common.d.ts +60 -0
- package/dist/common.js +543 -0
- package/dist/google/api/annotations.d.ts +1 -0
- package/dist/google/api/annotations.js +10 -0
- package/dist/google/api/field_behavior.d.ts +76 -0
- package/dist/google/api/field_behavior.js +146 -0
- package/dist/google/api/http.d.ts +379 -0
- package/dist/google/api/http.js +360 -0
- package/dist/google/api/httpbody.d.ts +78 -0
- package/dist/google/api/httpbody.js +127 -0
- package/dist/google/protobuf/any.d.ts +144 -0
- package/dist/google/protobuf/any.js +108 -0
- package/dist/google/protobuf/descriptor.d.ts +1338 -0
- package/dist/google/protobuf/descriptor.js +5427 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +190 -0
- package/dist/lookup.d.ts +876 -0
- package/dist/lookup.js +6841 -0
- package/dist/posts.d.ts +374 -0
- package/dist/posts.js +2784 -0
- package/package.json +43 -0
package/dist/posts.d.ts
ADDED
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { BaseListRequest, DeleteResponse, GetIDRequest, Metadata } from "./common";
|
|
3
|
+
export declare const protobufPackage = "pb";
|
|
4
|
+
export interface CreatePostRequest {
|
|
5
|
+
/** petition, eyewitness, regular */
|
|
6
|
+
postType: string;
|
|
7
|
+
title: string;
|
|
8
|
+
context: string;
|
|
9
|
+
media: string[];
|
|
10
|
+
targetSignatures: number;
|
|
11
|
+
category: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CreatePostResponse {
|
|
14
|
+
post: Post | undefined;
|
|
15
|
+
}
|
|
16
|
+
export interface GetPostResponse {
|
|
17
|
+
post: Post | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface ListPostsRequest {
|
|
20
|
+
base: BaseListRequest | undefined;
|
|
21
|
+
postType: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ListPostsResponse {
|
|
24
|
+
posts: Post[];
|
|
25
|
+
metadata: Metadata | undefined;
|
|
26
|
+
}
|
|
27
|
+
export interface UpdatePostRequest {
|
|
28
|
+
id: string;
|
|
29
|
+
title: string;
|
|
30
|
+
context: string;
|
|
31
|
+
media: string[];
|
|
32
|
+
status: string;
|
|
33
|
+
}
|
|
34
|
+
export interface UpdatePostResponse {
|
|
35
|
+
post: Post | undefined;
|
|
36
|
+
}
|
|
37
|
+
export interface LikePostRequest {
|
|
38
|
+
postId: string;
|
|
39
|
+
}
|
|
40
|
+
export interface LikePostResponse {
|
|
41
|
+
liked: boolean;
|
|
42
|
+
likesCount: number;
|
|
43
|
+
}
|
|
44
|
+
export interface UnlikePostRequest {
|
|
45
|
+
postId: string;
|
|
46
|
+
}
|
|
47
|
+
export interface BookmarkPostRequest {
|
|
48
|
+
postId: string;
|
|
49
|
+
}
|
|
50
|
+
export interface BookmarkPostResponse {
|
|
51
|
+
bookmarked: boolean;
|
|
52
|
+
bookmarksCount: number;
|
|
53
|
+
}
|
|
54
|
+
export interface UnbookmarkPostRequest {
|
|
55
|
+
postId: string;
|
|
56
|
+
}
|
|
57
|
+
export interface RepostRequest {
|
|
58
|
+
postId: string;
|
|
59
|
+
}
|
|
60
|
+
export interface RepostResponse {
|
|
61
|
+
reposted: boolean;
|
|
62
|
+
repostsCount: number;
|
|
63
|
+
}
|
|
64
|
+
export interface UnrepostRequest {
|
|
65
|
+
postId: string;
|
|
66
|
+
}
|
|
67
|
+
export interface SearchPostsRequest {
|
|
68
|
+
base: BaseListRequest | undefined;
|
|
69
|
+
query: string;
|
|
70
|
+
postType: string;
|
|
71
|
+
/** Limit for suggestions (default: 5) */
|
|
72
|
+
limit: number;
|
|
73
|
+
}
|
|
74
|
+
export interface SignPetitionRequest {
|
|
75
|
+
postId: string;
|
|
76
|
+
}
|
|
77
|
+
export interface SignPetitionResponse {
|
|
78
|
+
signed: boolean;
|
|
79
|
+
signaturesCount: number;
|
|
80
|
+
}
|
|
81
|
+
export interface UnsignPetitionRequest {
|
|
82
|
+
postId: string;
|
|
83
|
+
}
|
|
84
|
+
export interface ApproveEyewitnessReportRequest {
|
|
85
|
+
postId: string;
|
|
86
|
+
}
|
|
87
|
+
export interface ApproveEyewitnessReportResponse {
|
|
88
|
+
approved: boolean;
|
|
89
|
+
approvalsCount: number;
|
|
90
|
+
}
|
|
91
|
+
export interface UnapproveEyewitnessReportRequest {
|
|
92
|
+
postId: string;
|
|
93
|
+
}
|
|
94
|
+
export interface Post {
|
|
95
|
+
id: string;
|
|
96
|
+
postType: string;
|
|
97
|
+
title: string;
|
|
98
|
+
context: string;
|
|
99
|
+
media: string[];
|
|
100
|
+
creatorId: string;
|
|
101
|
+
creator: Creator | undefined;
|
|
102
|
+
status: string;
|
|
103
|
+
createdAt: string;
|
|
104
|
+
updatedAt: string;
|
|
105
|
+
engagement: PostEngagement | undefined;
|
|
106
|
+
userStatus: PostUserStatus | undefined;
|
|
107
|
+
}
|
|
108
|
+
export interface Creator {
|
|
109
|
+
id: string;
|
|
110
|
+
name: string;
|
|
111
|
+
email: string;
|
|
112
|
+
photoUrl: string;
|
|
113
|
+
}
|
|
114
|
+
export interface PostEngagement {
|
|
115
|
+
likesCount: number;
|
|
116
|
+
commentsCount: number;
|
|
117
|
+
repostsCount: number;
|
|
118
|
+
bookmarksCount: number;
|
|
119
|
+
signaturesCount?: number | undefined;
|
|
120
|
+
approvalsCount?: number | undefined;
|
|
121
|
+
}
|
|
122
|
+
export interface PostUserStatus {
|
|
123
|
+
isLiked: boolean;
|
|
124
|
+
isBookmarked: boolean;
|
|
125
|
+
isReposted: boolean;
|
|
126
|
+
isSigned?: boolean | undefined;
|
|
127
|
+
isApproved?: boolean | undefined;
|
|
128
|
+
}
|
|
129
|
+
export declare const CreatePostRequest: MessageFns<CreatePostRequest>;
|
|
130
|
+
export declare const CreatePostResponse: MessageFns<CreatePostResponse>;
|
|
131
|
+
export declare const GetPostResponse: MessageFns<GetPostResponse>;
|
|
132
|
+
export declare const ListPostsRequest: MessageFns<ListPostsRequest>;
|
|
133
|
+
export declare const ListPostsResponse: MessageFns<ListPostsResponse>;
|
|
134
|
+
export declare const UpdatePostRequest: MessageFns<UpdatePostRequest>;
|
|
135
|
+
export declare const UpdatePostResponse: MessageFns<UpdatePostResponse>;
|
|
136
|
+
export declare const LikePostRequest: MessageFns<LikePostRequest>;
|
|
137
|
+
export declare const LikePostResponse: MessageFns<LikePostResponse>;
|
|
138
|
+
export declare const UnlikePostRequest: MessageFns<UnlikePostRequest>;
|
|
139
|
+
export declare const BookmarkPostRequest: MessageFns<BookmarkPostRequest>;
|
|
140
|
+
export declare const BookmarkPostResponse: MessageFns<BookmarkPostResponse>;
|
|
141
|
+
export declare const UnbookmarkPostRequest: MessageFns<UnbookmarkPostRequest>;
|
|
142
|
+
export declare const RepostRequest: MessageFns<RepostRequest>;
|
|
143
|
+
export declare const RepostResponse: MessageFns<RepostResponse>;
|
|
144
|
+
export declare const UnrepostRequest: MessageFns<UnrepostRequest>;
|
|
145
|
+
export declare const SearchPostsRequest: MessageFns<SearchPostsRequest>;
|
|
146
|
+
export declare const SignPetitionRequest: MessageFns<SignPetitionRequest>;
|
|
147
|
+
export declare const SignPetitionResponse: MessageFns<SignPetitionResponse>;
|
|
148
|
+
export declare const UnsignPetitionRequest: MessageFns<UnsignPetitionRequest>;
|
|
149
|
+
export declare const ApproveEyewitnessReportRequest: MessageFns<ApproveEyewitnessReportRequest>;
|
|
150
|
+
export declare const ApproveEyewitnessReportResponse: MessageFns<ApproveEyewitnessReportResponse>;
|
|
151
|
+
export declare const UnapproveEyewitnessReportRequest: MessageFns<UnapproveEyewitnessReportRequest>;
|
|
152
|
+
export declare const Post: MessageFns<Post>;
|
|
153
|
+
export declare const Creator: MessageFns<Creator>;
|
|
154
|
+
export declare const PostEngagement: MessageFns<PostEngagement>;
|
|
155
|
+
export declare const PostUserStatus: MessageFns<PostUserStatus>;
|
|
156
|
+
/** Post Service */
|
|
157
|
+
export type PostServiceDefinition = typeof PostServiceDefinition;
|
|
158
|
+
export declare const PostServiceDefinition: {
|
|
159
|
+
readonly name: "PostService";
|
|
160
|
+
readonly fullName: "pb.PostService";
|
|
161
|
+
readonly methods: {
|
|
162
|
+
readonly createPost: {
|
|
163
|
+
readonly name: "CreatePost";
|
|
164
|
+
readonly requestType: MessageFns<CreatePostRequest>;
|
|
165
|
+
readonly requestStream: false;
|
|
166
|
+
readonly responseType: MessageFns<CreatePostResponse>;
|
|
167
|
+
readonly responseStream: false;
|
|
168
|
+
readonly options: {
|
|
169
|
+
readonly _unknownFields: {
|
|
170
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
readonly getPost: {
|
|
175
|
+
readonly name: "GetPost";
|
|
176
|
+
readonly requestType: import("./common").MessageFns<GetIDRequest>;
|
|
177
|
+
readonly requestStream: false;
|
|
178
|
+
readonly responseType: MessageFns<GetPostResponse>;
|
|
179
|
+
readonly responseStream: false;
|
|
180
|
+
readonly options: {
|
|
181
|
+
readonly _unknownFields: {
|
|
182
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
readonly listPosts: {
|
|
187
|
+
readonly name: "ListPosts";
|
|
188
|
+
readonly requestType: MessageFns<ListPostsRequest>;
|
|
189
|
+
readonly requestStream: false;
|
|
190
|
+
readonly responseType: MessageFns<ListPostsResponse>;
|
|
191
|
+
readonly responseStream: false;
|
|
192
|
+
readonly options: {
|
|
193
|
+
readonly _unknownFields: {
|
|
194
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
readonly updatePost: {
|
|
199
|
+
readonly name: "UpdatePost";
|
|
200
|
+
readonly requestType: MessageFns<UpdatePostRequest>;
|
|
201
|
+
readonly requestStream: false;
|
|
202
|
+
readonly responseType: MessageFns<UpdatePostResponse>;
|
|
203
|
+
readonly responseStream: false;
|
|
204
|
+
readonly options: {
|
|
205
|
+
readonly _unknownFields: {
|
|
206
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
readonly deletePost: {
|
|
211
|
+
readonly name: "DeletePost";
|
|
212
|
+
readonly requestType: import("./common").MessageFns<GetIDRequest>;
|
|
213
|
+
readonly requestStream: false;
|
|
214
|
+
readonly responseType: import("./common").MessageFns<DeleteResponse>;
|
|
215
|
+
readonly responseStream: false;
|
|
216
|
+
readonly options: {
|
|
217
|
+
readonly _unknownFields: {
|
|
218
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
readonly likePost: {
|
|
223
|
+
readonly name: "LikePost";
|
|
224
|
+
readonly requestType: MessageFns<LikePostRequest>;
|
|
225
|
+
readonly requestStream: false;
|
|
226
|
+
readonly responseType: MessageFns<LikePostResponse>;
|
|
227
|
+
readonly responseStream: false;
|
|
228
|
+
readonly options: {
|
|
229
|
+
readonly _unknownFields: {
|
|
230
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
readonly unlikePost: {
|
|
235
|
+
readonly name: "UnlikePost";
|
|
236
|
+
readonly requestType: MessageFns<UnlikePostRequest>;
|
|
237
|
+
readonly requestStream: false;
|
|
238
|
+
readonly responseType: import("./common").MessageFns<DeleteResponse>;
|
|
239
|
+
readonly responseStream: false;
|
|
240
|
+
readonly options: {
|
|
241
|
+
readonly _unknownFields: {
|
|
242
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
readonly bookmarkPost: {
|
|
247
|
+
readonly name: "BookmarkPost";
|
|
248
|
+
readonly requestType: MessageFns<BookmarkPostRequest>;
|
|
249
|
+
readonly requestStream: false;
|
|
250
|
+
readonly responseType: MessageFns<BookmarkPostResponse>;
|
|
251
|
+
readonly responseStream: false;
|
|
252
|
+
readonly options: {
|
|
253
|
+
readonly _unknownFields: {
|
|
254
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
readonly unbookmarkPost: {
|
|
259
|
+
readonly name: "UnbookmarkPost";
|
|
260
|
+
readonly requestType: MessageFns<UnbookmarkPostRequest>;
|
|
261
|
+
readonly requestStream: false;
|
|
262
|
+
readonly responseType: import("./common").MessageFns<DeleteResponse>;
|
|
263
|
+
readonly responseStream: false;
|
|
264
|
+
readonly options: {
|
|
265
|
+
readonly _unknownFields: {
|
|
266
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
readonly repost: {
|
|
271
|
+
readonly name: "Repost";
|
|
272
|
+
readonly requestType: MessageFns<RepostRequest>;
|
|
273
|
+
readonly requestStream: false;
|
|
274
|
+
readonly responseType: MessageFns<RepostResponse>;
|
|
275
|
+
readonly responseStream: false;
|
|
276
|
+
readonly options: {
|
|
277
|
+
readonly _unknownFields: {
|
|
278
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
readonly unrepost: {
|
|
283
|
+
readonly name: "Unrepost";
|
|
284
|
+
readonly requestType: MessageFns<UnrepostRequest>;
|
|
285
|
+
readonly requestStream: false;
|
|
286
|
+
readonly responseType: import("./common").MessageFns<DeleteResponse>;
|
|
287
|
+
readonly responseStream: false;
|
|
288
|
+
readonly options: {
|
|
289
|
+
readonly _unknownFields: {
|
|
290
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
readonly searchPosts: {
|
|
295
|
+
readonly name: "SearchPosts";
|
|
296
|
+
readonly requestType: MessageFns<SearchPostsRequest>;
|
|
297
|
+
readonly requestStream: false;
|
|
298
|
+
readonly responseType: MessageFns<ListPostsResponse>;
|
|
299
|
+
readonly responseStream: false;
|
|
300
|
+
readonly options: {
|
|
301
|
+
readonly _unknownFields: {
|
|
302
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
readonly signPetition: {
|
|
307
|
+
readonly name: "SignPetition";
|
|
308
|
+
readonly requestType: MessageFns<SignPetitionRequest>;
|
|
309
|
+
readonly requestStream: false;
|
|
310
|
+
readonly responseType: MessageFns<SignPetitionResponse>;
|
|
311
|
+
readonly responseStream: false;
|
|
312
|
+
readonly options: {
|
|
313
|
+
readonly _unknownFields: {
|
|
314
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
readonly unsignPetition: {
|
|
319
|
+
readonly name: "UnsignPetition";
|
|
320
|
+
readonly requestType: MessageFns<UnsignPetitionRequest>;
|
|
321
|
+
readonly requestStream: false;
|
|
322
|
+
readonly responseType: import("./common").MessageFns<DeleteResponse>;
|
|
323
|
+
readonly responseStream: false;
|
|
324
|
+
readonly options: {
|
|
325
|
+
readonly _unknownFields: {
|
|
326
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
readonly approveEyewitnessReport: {
|
|
331
|
+
readonly name: "ApproveEyewitnessReport";
|
|
332
|
+
readonly requestType: MessageFns<ApproveEyewitnessReportRequest>;
|
|
333
|
+
readonly requestStream: false;
|
|
334
|
+
readonly responseType: MessageFns<ApproveEyewitnessReportResponse>;
|
|
335
|
+
readonly responseStream: false;
|
|
336
|
+
readonly options: {
|
|
337
|
+
readonly _unknownFields: {
|
|
338
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
readonly unapproveEyewitnessReport: {
|
|
343
|
+
readonly name: "UnapproveEyewitnessReport";
|
|
344
|
+
readonly requestType: MessageFns<UnapproveEyewitnessReportRequest>;
|
|
345
|
+
readonly requestStream: false;
|
|
346
|
+
readonly responseType: import("./common").MessageFns<DeleteResponse>;
|
|
347
|
+
readonly responseStream: false;
|
|
348
|
+
readonly options: {
|
|
349
|
+
readonly _unknownFields: {
|
|
350
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
357
|
+
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 {} ? {
|
|
358
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
359
|
+
} : Partial<T>;
|
|
360
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
361
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
362
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
363
|
+
} & {
|
|
364
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
365
|
+
};
|
|
366
|
+
export interface MessageFns<T> {
|
|
367
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
368
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
369
|
+
fromJSON(object: any): T;
|
|
370
|
+
toJSON(message: T): unknown;
|
|
371
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
372
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
373
|
+
}
|
|
374
|
+
export {};
|