Remove bigints (#121)
* Alter script to change bigints to numbers * Run script to convert bigints to numbers
This commit is contained in:
parent
b027035bfa
commit
402aba2d38
27 changed files with 69 additions and 66 deletions
|
@ -13,4 +13,7 @@ cp db_views/bindings/* ../../lemmy-js-client/src/types/
|
|||
cp db_views_actor/bindings/* ../../lemmy-js-client/src/types/
|
||||
cp db_views_moderator/bindings/* ../../lemmy-js-client/src/types/
|
||||
|
||||
node ../../lemmy-js-client/putTypesInIndex.js
|
||||
# Change all the bigints to numbers
|
||||
find ../../lemmy-js-client/src/types -type f -name '*.ts' -exec sed -i 's/bigint/number/g' {} +
|
||||
|
||||
node ../../lemmy-js-client/putTypesInIndex.js
|
||||
|
|
|
@ -8,6 +8,6 @@ export interface BanFromCommunity {
|
|||
ban: boolean;
|
||||
remove_data?: boolean;
|
||||
reason?: string;
|
||||
expires?: bigint;
|
||||
expires?: number;
|
||||
auth: string;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@ export interface BanPerson {
|
|||
ban: boolean;
|
||||
remove_data?: boolean;
|
||||
reason?: string;
|
||||
expires?: bigint;
|
||||
expires?: number;
|
||||
auth: string;
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@ import type { CommentId } from "./CommentId";
|
|||
export interface CommentAggregates {
|
||||
id: number;
|
||||
comment_id: CommentId;
|
||||
score: bigint;
|
||||
upvotes: bigint;
|
||||
downvotes: bigint;
|
||||
score: number;
|
||||
upvotes: number;
|
||||
downvotes: number;
|
||||
published: string;
|
||||
child_count: number;
|
||||
}
|
||||
|
|
|
@ -4,12 +4,12 @@ import type { CommunityId } from "./CommunityId";
|
|||
export interface CommunityAggregates {
|
||||
id: number;
|
||||
community_id: CommunityId;
|
||||
subscribers: bigint;
|
||||
posts: bigint;
|
||||
comments: bigint;
|
||||
subscribers: number;
|
||||
posts: number;
|
||||
comments: number;
|
||||
published: string;
|
||||
users_active_day: bigint;
|
||||
users_active_week: bigint;
|
||||
users_active_month: bigint;
|
||||
users_active_half_year: bigint;
|
||||
users_active_day: number;
|
||||
users_active_week: number;
|
||||
users_active_month: number;
|
||||
users_active_half_year: number;
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@ export interface GetComments {
|
|||
type_?: ListingType;
|
||||
sort?: CommentSortType;
|
||||
max_depth?: number;
|
||||
page?: bigint;
|
||||
limit?: bigint;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
community_id?: CommunityId;
|
||||
community_name?: string;
|
||||
post_id?: PostId;
|
||||
|
|
|
@ -6,8 +6,8 @@ import type { PersonId } from "./PersonId";
|
|||
export interface GetModlog {
|
||||
mod_person_id?: PersonId;
|
||||
community_id?: CommunityId;
|
||||
page?: bigint;
|
||||
limit?: bigint;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
type_?: ModlogActionType;
|
||||
other_person_id?: PersonId;
|
||||
auth?: string;
|
||||
|
|
|
@ -7,8 +7,8 @@ export interface GetPersonDetails {
|
|||
person_id?: PersonId;
|
||||
username?: string;
|
||||
sort?: SortType;
|
||||
page?: bigint;
|
||||
limit?: bigint;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
community_id?: CommunityId;
|
||||
saved_only?: boolean;
|
||||
auth?: string;
|
||||
|
|
|
@ -3,8 +3,8 @@ import type { CommentSortType } from "./CommentSortType";
|
|||
|
||||
export interface GetPersonMentions {
|
||||
sort?: CommentSortType;
|
||||
page?: bigint;
|
||||
limit?: bigint;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
unread_only?: boolean;
|
||||
auth: string;
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ import type { SortType } from "./SortType";
|
|||
export interface GetPosts {
|
||||
type_?: ListingType;
|
||||
sort?: SortType;
|
||||
page?: bigint;
|
||||
limit?: bigint;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
community_id?: CommunityId;
|
||||
community_name?: string;
|
||||
saved_only?: boolean;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
export interface GetPrivateMessages {
|
||||
unread_only?: boolean;
|
||||
page?: bigint;
|
||||
limit?: bigint;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
auth: string;
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@ import type { CommentSortType } from "./CommentSortType";
|
|||
|
||||
export interface GetReplies {
|
||||
sort?: CommentSortType;
|
||||
page?: bigint;
|
||||
limit?: bigint;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
unread_only?: boolean;
|
||||
auth: string;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ import type { CommunityId } from "./CommunityId";
|
|||
|
||||
export interface GetReportCountResponse {
|
||||
community_id?: CommunityId;
|
||||
comment_reports: bigint;
|
||||
post_reports: bigint;
|
||||
private_message_reports?: bigint;
|
||||
comment_reports: number;
|
||||
post_reports: number;
|
||||
private_message_reports?: number;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface GetUnreadCountResponse {
|
||||
replies: bigint;
|
||||
mentions: bigint;
|
||||
private_messages: bigint;
|
||||
replies: number;
|
||||
mentions: number;
|
||||
private_messages: number;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface GetUnreadRegistrationApplicationCountResponse {
|
||||
registration_applications: bigint;
|
||||
registration_applications: number;
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
import type { CommunityId } from "./CommunityId";
|
||||
|
||||
export interface ListCommentReports {
|
||||
page?: bigint;
|
||||
limit?: bigint;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
unresolved_only?: boolean;
|
||||
community_id?: CommunityId;
|
||||
auth: string;
|
||||
|
|
|
@ -5,7 +5,7 @@ import type { SortType } from "./SortType";
|
|||
export interface ListCommunities {
|
||||
type_?: ListingType;
|
||||
sort?: SortType;
|
||||
page?: bigint;
|
||||
limit?: bigint;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
auth?: string;
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
import type { CommunityId } from "./CommunityId";
|
||||
|
||||
export interface ListPostReports {
|
||||
page?: bigint;
|
||||
limit?: bigint;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
unresolved_only?: boolean;
|
||||
community_id?: CommunityId;
|
||||
auth: string;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface ListPrivateMessageReports {
|
||||
page?: bigint;
|
||||
limit?: bigint;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
unresolved_only?: boolean;
|
||||
auth: string;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
export interface ListRegistrationApplications {
|
||||
unread_only?: boolean;
|
||||
page?: bigint;
|
||||
limit?: bigint;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
auth: string;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ export interface ModlogListParams {
|
|||
community_id?: CommunityId;
|
||||
mod_person_id?: PersonId;
|
||||
other_person_id?: PersonId;
|
||||
page?: bigint;
|
||||
limit?: bigint;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
hide_modlog_names: boolean;
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@ import type { PersonId } from "./PersonId";
|
|||
export interface PersonAggregates {
|
||||
id: number;
|
||||
person_id: PersonId;
|
||||
post_count: bigint;
|
||||
post_score: bigint;
|
||||
comment_count: bigint;
|
||||
comment_score: bigint;
|
||||
post_count: number;
|
||||
post_score: number;
|
||||
comment_count: number;
|
||||
comment_score: number;
|
||||
}
|
||||
|
|
|
@ -4,10 +4,10 @@ import type { PostId } from "./PostId";
|
|||
export interface PostAggregates {
|
||||
id: number;
|
||||
post_id: PostId;
|
||||
comments: bigint;
|
||||
score: bigint;
|
||||
upvotes: bigint;
|
||||
downvotes: bigint;
|
||||
comments: number;
|
||||
score: number;
|
||||
upvotes: number;
|
||||
downvotes: number;
|
||||
published: string;
|
||||
newest_comment_time_necro: string;
|
||||
newest_comment_time: string;
|
||||
|
|
|
@ -16,5 +16,5 @@ export interface PostView {
|
|||
read: boolean;
|
||||
creator_blocked: boolean;
|
||||
my_vote?: number;
|
||||
unread_comments: bigint;
|
||||
unread_comments: number;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@ export interface RemoveCommunity {
|
|||
community_id: CommunityId;
|
||||
removed: boolean;
|
||||
reason?: string;
|
||||
expires?: bigint;
|
||||
expires?: number;
|
||||
auth: string;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ export interface Search {
|
|||
type_?: SearchType;
|
||||
sort?: SortType;
|
||||
listing_type?: ListingType;
|
||||
page?: bigint;
|
||||
limit?: bigint;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
auth?: string;
|
||||
}
|
||||
|
|
|
@ -4,12 +4,12 @@ import type { SiteId } from "./SiteId";
|
|||
export interface SiteAggregates {
|
||||
id: number;
|
||||
site_id: SiteId;
|
||||
users: bigint;
|
||||
posts: bigint;
|
||||
comments: bigint;
|
||||
communities: bigint;
|
||||
users_active_day: bigint;
|
||||
users_active_week: bigint;
|
||||
users_active_month: bigint;
|
||||
users_active_half_year: bigint;
|
||||
users: number;
|
||||
posts: number;
|
||||
comments: number;
|
||||
communities: number;
|
||||
users_active_day: number;
|
||||
users_active_week: number;
|
||||
users_active_month: number;
|
||||
users_active_half_year: number;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue