mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-29 15:51:12 +00:00
Merge pull request #188 from MV-GH/add_int_visibility
Add original int type info for number
This commit is contained in:
commit
e270d67086
34 changed files with 87 additions and 68 deletions
0
.husky/pre-commit
Executable file → Normal file
0
.husky/pre-commit
Executable file → Normal file
2
copy_generated_types_from_lemmy.sh
Executable file → Normal file
2
copy_generated_types_from_lemmy.sh
Executable file → Normal file
|
@ -25,7 +25,7 @@ popd
|
||||||
rm src/types/Sensitive.ts
|
rm src/types/Sensitive.ts
|
||||||
|
|
||||||
# Change all the bigints to numbers
|
# Change all the bigints to numbers
|
||||||
find src/types -type f -name '*.ts' -exec sed -i 's/bigint/number/g' {} +
|
find src/types -type f -name '*.ts' -exec sed -i 's/bigint/\/* integer *\/ number/g' {} +
|
||||||
|
|
||||||
node putTypesInIndex.js
|
node putTypesInIndex.js
|
||||||
|
|
||||||
|
|
0
deploy.sh
Executable file → Normal file
0
deploy.sh
Executable file → Normal file
|
@ -82,6 +82,7 @@ export { EditSite } from "./types/EditSite";
|
||||||
export { FeaturePost } from "./types/FeaturePost";
|
export { FeaturePost } from "./types/FeaturePost";
|
||||||
export { FederatedInstances } from "./types/FederatedInstances";
|
export { FederatedInstances } from "./types/FederatedInstances";
|
||||||
export { FollowCommunity } from "./types/FollowCommunity";
|
export { FollowCommunity } from "./types/FollowCommunity";
|
||||||
|
export { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
|
||||||
export { GetCaptchaResponse } from "./types/GetCaptchaResponse";
|
export { GetCaptchaResponse } from "./types/GetCaptchaResponse";
|
||||||
export { GetComment } from "./types/GetComment";
|
export { GetComment } from "./types/GetComment";
|
||||||
export { GetComments } from "./types/GetComments";
|
export { GetComments } from "./types/GetComments";
|
||||||
|
@ -236,6 +237,8 @@ export { SortType } from "./types/SortType";
|
||||||
export { SubscribedType } from "./types/SubscribedType";
|
export { SubscribedType } from "./types/SubscribedType";
|
||||||
export { Tagline } from "./types/Tagline";
|
export { Tagline } from "./types/Tagline";
|
||||||
export { TransferCommunity } from "./types/TransferCommunity";
|
export { TransferCommunity } from "./types/TransferCommunity";
|
||||||
|
export { UpdateTotp } from "./types/UpdateTotp";
|
||||||
|
export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
||||||
export { VerifyEmail } from "./types/VerifyEmail";
|
export { VerifyEmail } from "./types/VerifyEmail";
|
||||||
export { VerifyEmailResponse } from "./types/VerifyEmailResponse";
|
export { VerifyEmailResponse } from "./types/VerifyEmailResponse";
|
||||||
export { UploadImage, UploadImageResponse, ImageFile } from "./types/others";
|
export { ImageFile, UploadImage, UploadImageResponse } from "./types/others";
|
||||||
|
|
|
@ -8,5 +8,5 @@ export interface BanFromCommunity {
|
||||||
ban: boolean;
|
ban: boolean;
|
||||||
remove_data?: boolean;
|
remove_data?: boolean;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
expires?: number;
|
expires?: /* integer */ number;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,5 +6,5 @@ export interface BanPerson {
|
||||||
ban: boolean;
|
ban: boolean;
|
||||||
remove_data?: boolean;
|
remove_data?: boolean;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
expires?: number;
|
expires?: /* integer */ number;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,9 @@ import type { CommentId } from "./CommentId";
|
||||||
export interface CommentAggregates {
|
export interface CommentAggregates {
|
||||||
id: number;
|
id: number;
|
||||||
comment_id: CommentId;
|
comment_id: CommentId;
|
||||||
score: number;
|
score: /* integer */ number;
|
||||||
upvotes: number;
|
upvotes: /* integer */ number;
|
||||||
downvotes: number;
|
downvotes: /* integer */ number;
|
||||||
published: string;
|
published: string;
|
||||||
child_count: number;
|
child_count: number;
|
||||||
hot_rank: number;
|
hot_rank: number;
|
||||||
|
|
|
@ -4,13 +4,13 @@ import type { CommunityId } from "./CommunityId";
|
||||||
export interface CommunityAggregates {
|
export interface CommunityAggregates {
|
||||||
id: number;
|
id: number;
|
||||||
community_id: CommunityId;
|
community_id: CommunityId;
|
||||||
subscribers: number;
|
subscribers: /* integer */ number;
|
||||||
posts: number;
|
posts: /* integer */ number;
|
||||||
comments: number;
|
comments: /* integer */ number;
|
||||||
published: string;
|
published: string;
|
||||||
users_active_day: number;
|
users_active_day: /* integer */ number;
|
||||||
users_active_week: number;
|
users_active_week: /* integer */ number;
|
||||||
users_active_month: number;
|
users_active_month: /* integer */ number;
|
||||||
users_active_half_year: number;
|
users_active_half_year: /* integer */ number;
|
||||||
hot_rank: number;
|
hot_rank: number;
|
||||||
}
|
}
|
||||||
|
|
5
src/types/GenerateTotpSecretResponse.ts
Normal file
5
src/types/GenerateTotpSecretResponse.ts
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
export interface GenerateTotpSecretResponse {
|
||||||
|
totp_secret_url: string;
|
||||||
|
}
|
|
@ -9,8 +9,8 @@ export interface GetComments {
|
||||||
type_?: ListingType;
|
type_?: ListingType;
|
||||||
sort?: CommentSortType;
|
sort?: CommentSortType;
|
||||||
max_depth?: number;
|
max_depth?: number;
|
||||||
page?: number;
|
page?: /* integer */ number;
|
||||||
limit?: number;
|
limit?: /* integer */ number;
|
||||||
community_id?: CommunityId;
|
community_id?: CommunityId;
|
||||||
community_name?: string;
|
community_name?: string;
|
||||||
post_id?: PostId;
|
post_id?: PostId;
|
||||||
|
|
|
@ -6,8 +6,8 @@ import type { PersonId } from "./PersonId";
|
||||||
export interface GetModlog {
|
export interface GetModlog {
|
||||||
mod_person_id?: PersonId;
|
mod_person_id?: PersonId;
|
||||||
community_id?: CommunityId;
|
community_id?: CommunityId;
|
||||||
page?: number;
|
page?: /* integer */ number;
|
||||||
limit?: number;
|
limit?: /* integer */ number;
|
||||||
type_?: ModlogActionType;
|
type_?: ModlogActionType;
|
||||||
other_person_id?: PersonId;
|
other_person_id?: PersonId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,8 @@ export interface GetPersonDetails {
|
||||||
person_id?: PersonId;
|
person_id?: PersonId;
|
||||||
username?: string;
|
username?: string;
|
||||||
sort?: SortType;
|
sort?: SortType;
|
||||||
page?: number;
|
page?: /* integer */ number;
|
||||||
limit?: number;
|
limit?: /* integer */ number;
|
||||||
community_id?: CommunityId;
|
community_id?: CommunityId;
|
||||||
saved_only?: boolean;
|
saved_only?: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ import type { CommentSortType } from "./CommentSortType";
|
||||||
|
|
||||||
export interface GetPersonMentions {
|
export interface GetPersonMentions {
|
||||||
sort?: CommentSortType;
|
sort?: CommentSortType;
|
||||||
page?: number;
|
page?: /* integer */ number;
|
||||||
limit?: number;
|
limit?: /* integer */ number;
|
||||||
unread_only?: boolean;
|
unread_only?: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,8 @@ import type { SortType } from "./SortType";
|
||||||
export interface GetPosts {
|
export interface GetPosts {
|
||||||
type_?: ListingType;
|
type_?: ListingType;
|
||||||
sort?: SortType;
|
sort?: SortType;
|
||||||
page?: number;
|
page?: /* integer */ number;
|
||||||
limit?: number;
|
limit?: /* integer */ number;
|
||||||
community_id?: CommunityId;
|
community_id?: CommunityId;
|
||||||
community_name?: string;
|
community_name?: string;
|
||||||
saved_only?: boolean;
|
saved_only?: boolean;
|
||||||
|
|
|
@ -3,7 +3,7 @@ import type { PersonId } from "./PersonId";
|
||||||
|
|
||||||
export interface GetPrivateMessages {
|
export interface GetPrivateMessages {
|
||||||
unread_only?: boolean;
|
unread_only?: boolean;
|
||||||
page?: number;
|
page?: /* integer */ number;
|
||||||
limit?: number;
|
limit?: /* integer */ number;
|
||||||
creator_id?: PersonId;
|
creator_id?: PersonId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ import type { CommentSortType } from "./CommentSortType";
|
||||||
|
|
||||||
export interface GetReplies {
|
export interface GetReplies {
|
||||||
sort?: CommentSortType;
|
sort?: CommentSortType;
|
||||||
page?: number;
|
page?: /* integer */ number;
|
||||||
limit?: number;
|
limit?: /* integer */ number;
|
||||||
unread_only?: boolean;
|
unread_only?: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ import type { CommunityId } from "./CommunityId";
|
||||||
|
|
||||||
export interface GetReportCountResponse {
|
export interface GetReportCountResponse {
|
||||||
community_id?: CommunityId;
|
community_id?: CommunityId;
|
||||||
comment_reports: number;
|
comment_reports: /* integer */ number;
|
||||||
post_reports: number;
|
post_reports: /* integer */ number;
|
||||||
private_message_reports?: number;
|
private_message_reports?: /* integer */ 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.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
export interface GetUnreadCountResponse {
|
export interface GetUnreadCountResponse {
|
||||||
replies: number;
|
replies: /* integer */ number;
|
||||||
mentions: number;
|
mentions: /* integer */ number;
|
||||||
private_messages: number;
|
private_messages: /* integer */ 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.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
export interface GetUnreadRegistrationApplicationCountResponse {
|
export interface GetUnreadRegistrationApplicationCountResponse {
|
||||||
registration_applications: number;
|
registration_applications: /* integer */ number;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
import type { CommunityId } from "./CommunityId";
|
import type { CommunityId } from "./CommunityId";
|
||||||
|
|
||||||
export interface ListCommentReports {
|
export interface ListCommentReports {
|
||||||
page?: number;
|
page?: /* integer */ number;
|
||||||
limit?: number;
|
limit?: /* integer */ number;
|
||||||
unresolved_only?: boolean;
|
unresolved_only?: boolean;
|
||||||
community_id?: CommunityId;
|
community_id?: CommunityId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,6 @@ export interface ListCommunities {
|
||||||
type_?: ListingType;
|
type_?: ListingType;
|
||||||
sort?: SortType;
|
sort?: SortType;
|
||||||
show_nsfw?: boolean;
|
show_nsfw?: boolean;
|
||||||
page?: number;
|
page?: /* integer */ number;
|
||||||
limit?: number;
|
limit?: /* integer */ number;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
import type { CommunityId } from "./CommunityId";
|
import type { CommunityId } from "./CommunityId";
|
||||||
|
|
||||||
export interface ListPostReports {
|
export interface ListPostReports {
|
||||||
page?: number;
|
page?: /* integer */ number;
|
||||||
limit?: number;
|
limit?: /* integer */ number;
|
||||||
unresolved_only?: boolean;
|
unresolved_only?: boolean;
|
||||||
community_id?: CommunityId;
|
community_id?: CommunityId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
export interface ListPrivateMessageReports {
|
export interface ListPrivateMessageReports {
|
||||||
page?: number;
|
page?: /* integer */ number;
|
||||||
limit?: number;
|
limit?: /* integer */ number;
|
||||||
unresolved_only?: boolean;
|
unresolved_only?: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
export interface ListRegistrationApplications {
|
export interface ListRegistrationApplications {
|
||||||
unread_only?: boolean;
|
unread_only?: boolean;
|
||||||
page?: number;
|
page?: /* integer */ number;
|
||||||
limit?: number;
|
limit?: /* integer */ number;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,11 +23,11 @@ export interface LocalUser {
|
||||||
show_new_post_notifs: boolean;
|
show_new_post_notifs: boolean;
|
||||||
email_verified: boolean;
|
email_verified: boolean;
|
||||||
accepted_application: boolean;
|
accepted_application: boolean;
|
||||||
totp_2fa_url?: string;
|
|
||||||
open_links_in_new_tab: boolean;
|
open_links_in_new_tab: boolean;
|
||||||
blur_nsfw: boolean;
|
blur_nsfw: boolean;
|
||||||
auto_expand: boolean;
|
auto_expand: boolean;
|
||||||
infinite_scroll_enabled: boolean;
|
infinite_scroll_enabled: boolean;
|
||||||
admin: boolean;
|
admin: boolean;
|
||||||
post_listing_mode: PostListingMode;
|
post_listing_mode: PostListingMode;
|
||||||
|
totp_2fa_enabled: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ export interface ModlogListParams {
|
||||||
community_id?: CommunityId;
|
community_id?: CommunityId;
|
||||||
mod_person_id?: PersonId;
|
mod_person_id?: PersonId;
|
||||||
other_person_id?: PersonId;
|
other_person_id?: PersonId;
|
||||||
page?: number;
|
page?: /* integer */ number;
|
||||||
limit?: number;
|
limit?: /* integer */ number;
|
||||||
hide_modlog_names: boolean;
|
hide_modlog_names: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@ import type { PersonId } from "./PersonId";
|
||||||
export interface PersonAggregates {
|
export interface PersonAggregates {
|
||||||
id: number;
|
id: number;
|
||||||
person_id: PersonId;
|
person_id: PersonId;
|
||||||
post_count: number;
|
post_count: /* integer */ number;
|
||||||
post_score: number;
|
post_score: /* integer */ number;
|
||||||
comment_count: number;
|
comment_count: /* integer */ number;
|
||||||
comment_score: number;
|
comment_score: /* integer */ number;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,10 @@ import type { PostId } from "./PostId";
|
||||||
export interface PostAggregates {
|
export interface PostAggregates {
|
||||||
id: number;
|
id: number;
|
||||||
post_id: PostId;
|
post_id: PostId;
|
||||||
comments: number;
|
comments: /* integer */ number;
|
||||||
score: number;
|
score: /* integer */ number;
|
||||||
upvotes: number;
|
upvotes: /* integer */ number;
|
||||||
downvotes: number;
|
downvotes: /* integer */ number;
|
||||||
published: string;
|
published: string;
|
||||||
newest_comment_time_necro: string;
|
newest_comment_time_necro: string;
|
||||||
newest_comment_time: string;
|
newest_comment_time: string;
|
||||||
|
|
|
@ -16,5 +16,5 @@ export interface PostView {
|
||||||
read: boolean;
|
read: boolean;
|
||||||
creator_blocked: boolean;
|
creator_blocked: boolean;
|
||||||
my_vote?: number;
|
my_vote?: number;
|
||||||
unread_comments: number;
|
unread_comments: /* integer */ number;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,5 +5,5 @@ export interface RemoveCommunity {
|
||||||
community_id: CommunityId;
|
community_id: CommunityId;
|
||||||
removed: boolean;
|
removed: boolean;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
expires?: number;
|
expires?: /* integer */ number;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,6 @@ export interface Search {
|
||||||
type_?: SearchType;
|
type_?: SearchType;
|
||||||
sort?: SortType;
|
sort?: SortType;
|
||||||
listing_type?: ListingType;
|
listing_type?: ListingType;
|
||||||
page?: number;
|
page?: /* integer */ number;
|
||||||
limit?: number;
|
limit?: /* integer */ number;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,12 +4,12 @@ import type { SiteId } from "./SiteId";
|
||||||
export interface SiteAggregates {
|
export interface SiteAggregates {
|
||||||
id: number;
|
id: number;
|
||||||
site_id: SiteId;
|
site_id: SiteId;
|
||||||
users: number;
|
users: /* integer */ number;
|
||||||
posts: number;
|
posts: /* integer */ number;
|
||||||
comments: number;
|
comments: /* integer */ number;
|
||||||
communities: number;
|
communities: /* integer */ number;
|
||||||
users_active_day: number;
|
users_active_day: /* integer */ number;
|
||||||
users_active_week: number;
|
users_active_week: /* integer */ number;
|
||||||
users_active_month: number;
|
users_active_month: /* integer */ number;
|
||||||
users_active_half_year: number;
|
users_active_half_year: /* integer */ number;
|
||||||
}
|
}
|
||||||
|
|
6
src/types/UpdateTotp.ts
Normal file
6
src/types/UpdateTotp.ts
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
export interface UpdateTotp {
|
||||||
|
totp_token: string;
|
||||||
|
enabled: boolean;
|
||||||
|
}
|
5
src/types/UpdateTotpResponse.ts
Normal file
5
src/types/UpdateTotpResponse.ts
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
export interface UpdateTotpResponse {
|
||||||
|
enabled: boolean;
|
||||||
|
}
|
Loading…
Reference in a new issue