diff --git a/copy_generated_types_from_lemmy.sh b/copy_generated_types_from_lemmy.sh index a2e1ee57..dc407424 100755 --- a/copy_generated_types_from_lemmy.sh +++ b/copy_generated_types_from_lemmy.sh @@ -30,6 +30,9 @@ rm src/types/Sensitive.ts # Change all the bigints to numbers find src/types -type f -name '*.ts' -exec sed -i 's/bigint/number/g' {} + +# on MacOS: +# find src/types -type f -name '*.ts' -exec sed -i '' -e 's/bigint/number/g' {} \; + node putTypesInIndex.js prettier -w src diff --git a/src/http.ts b/src/http.ts index e51e2a29..d0393548 100644 --- a/src/http.ts +++ b/src/http.ts @@ -22,6 +22,7 @@ import { CreateCommentLike } from "./types/CreateCommentLike"; import { CreateCommentReport } from "./types/CreateCommentReport"; import { CreateCommunity } from "./types/CreateCommunity"; import { CreateCustomEmoji } from "./types/CreateCustomEmoji"; +import { CreateOAuthProvider } from "./types/CreateOAuthProvider"; import { CreatePost } from "./types/CreatePost"; import { CreatePostLike } from "./types/CreatePostLike"; import { CreatePostReport } from "./types/CreatePostReport"; @@ -33,15 +34,18 @@ import { DeleteAccount } from "./types/DeleteAccount"; import { DeleteComment } from "./types/DeleteComment"; import { DeleteCommunity } from "./types/DeleteCommunity"; import { DeleteCustomEmoji } from "./types/DeleteCustomEmoji"; +import { DeleteOAuthProvider } from "./types/DeleteOAuthProvider"; import { DeletePost } from "./types/DeletePost"; import { DeletePrivateMessage } from "./types/DeletePrivateMessage"; import { DistinguishComment } from "./types/DistinguishComment"; import { EditComment } from "./types/EditComment"; import { EditCommunity } from "./types/EditCommunity"; import { EditCustomEmoji } from "./types/EditCustomEmoji"; +import { EditOAuthProvider } from "./types/EditOAuthProvider"; import { EditPost } from "./types/EditPost"; import { EditPrivateMessage } from "./types/EditPrivateMessage"; import { EditSite } from "./types/EditSite"; +import { OAuthProvider } from "./types/OAuthProvider"; import { FeaturePost } from "./types/FeaturePost"; import { FollowCommunity } from "./types/FollowCommunity"; import { GetCaptchaResponse } from "./types/GetCaptchaResponse"; @@ -139,6 +143,7 @@ import { ListCommentLikesResponse } from "./types/ListCommentLikesResponse"; import { HidePost } from "./types/HidePost"; import { ListMedia } from "./types/ListMedia"; import { ListMediaResponse } from "./types/ListMediaResponse"; +import { AuthenticateWithOauth } from "./types/AuthenticateWithOauth"; enum HttpType { Get = "GET", @@ -1421,6 +1426,58 @@ export class LemmyHttp { ); } + /** + * Create a new oauth provider method + * + * `HTTP.POST /oauth_provider` + */ + createOAuthProvider(form: CreateOAuthProvider) { + return this.#wrapper( + HttpType.Post, + "/oauth_provider", + form, + ); + } + + /** + * Edit an existing oauth provider method + * + * `HTTP.PUT /oauth_provider` + */ + editOAuthProvider(form: EditOAuthProvider) { + return this.#wrapper( + HttpType.Put, + "/oauth_provider", + form, + ); + } + + /** + * Delete an oauth provider method + * + * `HTTP.Post /oauth_provider/delete` + */ + deleteOAuthProvider(form: DeleteOAuthProvider) { + return this.#wrapper( + HttpType.Post, + "/oauth_provider/delete", + form, + ); + } + + /** + * Authenticate with OAuth + * + * `HTTP.Post /oauth/authenticate` + */ + authenticateWithOAuth(form: AuthenticateWithOauth) { + return this.#wrapper( + HttpType.Post, + "/oauth/authenticate", + form, + ); + } + /** * Fetch federated instances. * diff --git a/src/index.ts b/src/index.ts index 92562096..a7d3d6b2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -13,6 +13,7 @@ export { AdminPurgePersonView } from "./types/AdminPurgePersonView"; export { AdminPurgePost } from "./types/AdminPurgePost"; export { AdminPurgePostView } from "./types/AdminPurgePostView"; export { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication"; +export { AuthenticateWithOauth } from "./types/AuthenticateWithOauth"; export { BanFromCommunity } from "./types/BanFromCommunity"; export { BanFromCommunityResponse } from "./types/BanFromCommunityResponse"; export { BanPerson } from "./types/BanPerson"; @@ -42,7 +43,6 @@ export { CommentSortType } from "./types/CommentSortType"; export { CommentView } from "./types/CommentView"; export { Community } from "./types/Community"; export { CommunityAggregates } from "./types/CommunityAggregates"; -export { CommunityBlockView } from "./types/CommunityBlockView"; export { CommunityFollowerView } from "./types/CommunityFollowerView"; export { CommunityId } from "./types/CommunityId"; export { CommunityModeratorView } from "./types/CommunityModeratorView"; @@ -54,6 +54,7 @@ export { CreateCommentLike } from "./types/CreateCommentLike"; export { CreateCommentReport } from "./types/CreateCommentReport"; export { CreateCommunity } from "./types/CreateCommunity"; export { CreateCustomEmoji } from "./types/CreateCustomEmoji"; +export { CreateOAuthProvider } from "./types/CreateOAuthProvider"; export { CreatePost } from "./types/CreatePost"; export { CreatePostLike } from "./types/CreatePostLike"; export { CreatePostReport } from "./types/CreatePostReport"; @@ -69,12 +70,14 @@ export { DeleteAccount } from "./types/DeleteAccount"; export { DeleteComment } from "./types/DeleteComment"; export { DeleteCommunity } from "./types/DeleteCommunity"; export { DeleteCustomEmoji } from "./types/DeleteCustomEmoji"; +export { DeleteOAuthProvider } from "./types/DeleteOAuthProvider"; export { DeletePost } from "./types/DeletePost"; export { DeletePrivateMessage } from "./types/DeletePrivateMessage"; export { DistinguishComment } from "./types/DistinguishComment"; export { EditComment } from "./types/EditComment"; export { EditCommunity } from "./types/EditCommunity"; export { EditCustomEmoji } from "./types/EditCustomEmoji"; +export { EditOAuthProvider } from "./types/EditOAuthProvider"; export { EditPost } from "./types/EditPost"; export { EditPrivateMessage } from "./types/EditPrivateMessage"; export { EditSite } from "./types/EditSite"; @@ -100,6 +103,7 @@ export { GetPostResponse } from "./types/GetPostResponse"; export { GetPosts } from "./types/GetPosts"; export { GetPostsResponse } from "./types/GetPostsResponse"; export { GetPrivateMessages } from "./types/GetPrivateMessages"; +export { GetRegistrationApplication } from "./types/GetRegistrationApplication"; export { GetReplies } from "./types/GetReplies"; export { GetRepliesResponse } from "./types/GetRepliesResponse"; export { GetReportCount } from "./types/GetReportCount"; @@ -111,8 +115,8 @@ export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse"; export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse"; export { HideCommunity } from "./types/HideCommunity"; export { HidePost } from "./types/HidePost"; +export { ImageDetails } from "./types/ImageDetails"; export { Instance } from "./types/Instance"; -export { InstanceBlockView } from "./types/InstanceBlockView"; export { InstanceId } from "./types/InstanceId"; export { InstanceWithFederationState } from "./types/InstanceWithFederationState"; export { Language } from "./types/Language"; @@ -125,6 +129,7 @@ export { ListCommentReports } from "./types/ListCommentReports"; export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse"; export { ListCommunities } from "./types/ListCommunities"; export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse"; +export { ListLoginsResponse } from "./types/ListLoginsResponse"; export { ListMedia } from "./types/ListMedia"; export { ListMediaResponse } from "./types/ListMediaResponse"; export { ListPostLikes } from "./types/ListPostLikes"; @@ -179,14 +184,17 @@ export { ModTransferCommunityView } from "./types/ModTransferCommunityView"; export { ModlogActionType } from "./types/ModlogActionType"; export { ModlogListParams } from "./types/ModlogListParams"; export { MyUserInfo } from "./types/MyUserInfo"; +export { OAuthAccount } from "./types/OAuthAccount"; +export { OAuthProvider } from "./types/OAuthProvider"; +export { OAuthProviderId } from "./types/OAuthProviderId"; +export { OAuthProviderInsertForm } from "./types/OAuthProviderInsertForm"; +export { OAuthProviderUpdateForm } from "./types/OAuthProviderUpdateForm"; export { OpenGraphData } from "./types/OpenGraphData"; export { PaginationCursor } from "./types/PaginationCursor"; export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset"; export { PasswordReset } from "./types/PasswordReset"; export { Person } from "./types/Person"; export { PersonAggregates } from "./types/PersonAggregates"; -export { PersonBlockId } from "./types/PersonBlockId"; -export { PersonBlockView } from "./types/PersonBlockView"; export { PersonId } from "./types/PersonId"; export { PersonMention } from "./types/PersonMention"; export { PersonMentionId } from "./types/PersonMentionId"; @@ -213,6 +221,7 @@ export { PrivateMessageReportView } from "./types/PrivateMessageReportView"; export { PrivateMessageResponse } from "./types/PrivateMessageResponse"; export { PrivateMessageView } from "./types/PrivateMessageView"; export { PrivateMessagesResponse } from "./types/PrivateMessagesResponse"; +export { PublicOAuthProvider } from "./types/PublicOAuthProvider"; export { PurgeComment } from "./types/PurgeComment"; export { PurgeCommunity } from "./types/PurgeCommunity"; export { PurgePerson } from "./types/PurgePerson"; @@ -220,6 +229,7 @@ export { PurgePost } from "./types/PurgePost"; export { ReadableFederationState } from "./types/ReadableFederationState"; export { Register } from "./types/Register"; export { RegistrationApplication } from "./types/RegistrationApplication"; +export { RegistrationApplicationId } from "./types/RegistrationApplicationId"; export { RegistrationApplicationResponse } from "./types/RegistrationApplicationResponse"; export { RegistrationApplicationView } from "./types/RegistrationApplicationView"; export { RegistrationMode } from "./types/RegistrationMode"; diff --git a/src/types/ApproveRegistrationApplication.ts b/src/types/ApproveRegistrationApplication.ts index 88d172a3..273d31fc 100644 --- a/src/types/ApproveRegistrationApplication.ts +++ b/src/types/ApproveRegistrationApplication.ts @@ -1,7 +1,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { RegistrationApplicationId } from "./RegistrationApplicationId"; export interface ApproveRegistrationApplication { - id: number; + id: RegistrationApplicationId; approve: boolean; deny_reason?: string; } diff --git a/src/types/AuthenticateWithOauth.ts b/src/types/AuthenticateWithOauth.ts new file mode 100644 index 00000000..157a5ce7 --- /dev/null +++ b/src/types/AuthenticateWithOauth.ts @@ -0,0 +1,10 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export interface AuthenticateWithOauth { + code: string; + oauth_provider_id: string; + redirect_uri: string; + show_nsfw?: boolean; + username?: string; + answer?: string; +} diff --git a/src/types/CommunityBlockView.ts b/src/types/CommunityBlockView.ts deleted file mode 100644 index ac51d135..00000000 --- a/src/types/CommunityBlockView.ts +++ /dev/null @@ -1,8 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Community } from "./Community"; -import type { Person } from "./Person"; - -export interface CommunityBlockView { - person: Person; - community: Community; -} diff --git a/src/types/CreateOAuthProvider.ts b/src/types/CreateOAuthProvider.ts new file mode 100644 index 00000000..5ad31d35 --- /dev/null +++ b/src/types/CreateOAuthProvider.ts @@ -0,0 +1,16 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export interface CreateOAuthProvider { + display_name: string; + issuer: string; + authorization_endpoint: string; + token_endpoint: string; + userinfo_endpoint: string; + id_claim: string; + client_id: string; + client_secret: string; + scopes: string; + auto_verify_email: boolean; + account_linking_enabled: boolean; + enabled: boolean; +} diff --git a/src/types/CreateSite.ts b/src/types/CreateSite.ts index 3cb74312..7be2e778 100644 --- a/src/types/CreateSite.ts +++ b/src/types/CreateSite.ts @@ -46,6 +46,7 @@ export interface CreateSite { blocked_instances?: Array; taglines?: Array; registration_mode?: RegistrationMode; + oauth_registration?: boolean; content_warning?: string; default_post_listing_mode?: PostListingMode; } diff --git a/src/types/DeleteOAuthProvider.ts b/src/types/DeleteOAuthProvider.ts new file mode 100644 index 00000000..c7c56752 --- /dev/null +++ b/src/types/DeleteOAuthProvider.ts @@ -0,0 +1,6 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { OAuthProviderId } from "./OAuthProviderId"; + +export interface DeleteOAuthProvider { + id: OAuthProviderId; +} diff --git a/src/types/EditOAuthProvider.ts b/src/types/EditOAuthProvider.ts new file mode 100644 index 00000000..c90c2fcc --- /dev/null +++ b/src/types/EditOAuthProvider.ts @@ -0,0 +1,16 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { OAuthProviderId } from "./OAuthProviderId"; + +export interface EditOAuthProvider { + id: OAuthProviderId; + display_name: string | null; + authorization_endpoint: string | null; + token_endpoint: string | null; + userinfo_endpoint: string | null; + id_claim: string | null; + client_secret: string | null; + scopes: string | null; + auto_verify_email: boolean | null; + account_linking_enabled: boolean | null; + enabled: boolean | null; +} diff --git a/src/types/EditSite.ts b/src/types/EditSite.ts index ef98f5e1..f5152213 100644 --- a/src/types/EditSite.ts +++ b/src/types/EditSite.ts @@ -47,6 +47,7 @@ export interface EditSite { blocked_urls?: Array; taglines?: Array; registration_mode?: RegistrationMode; + oauth_registration?: boolean; reports_email_admins?: boolean; content_warning?: string; default_post_listing_mode?: PostListingMode; diff --git a/src/types/GetPosts.ts b/src/types/GetPosts.ts index 9da31496..f77f0607 100644 --- a/src/types/GetPosts.ts +++ b/src/types/GetPosts.ts @@ -15,5 +15,7 @@ export interface GetPosts { liked_only?: boolean; disliked_only?: boolean; show_hidden?: boolean; + show_read?: boolean; + show_nsfw?: boolean; page_cursor?: PaginationCursor; } diff --git a/src/types/GetRegistrationApplication.ts b/src/types/GetRegistrationApplication.ts new file mode 100644 index 00000000..2a63a558 --- /dev/null +++ b/src/types/GetRegistrationApplication.ts @@ -0,0 +1,6 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { PersonId } from "./PersonId"; + +export interface GetRegistrationApplication { + person_id: PersonId; +} diff --git a/src/types/GetSiteResponse.ts b/src/types/GetSiteResponse.ts index 04199011..8408b9f3 100644 --- a/src/types/GetSiteResponse.ts +++ b/src/types/GetSiteResponse.ts @@ -4,7 +4,9 @@ import type { Language } from "./Language"; import type { LanguageId } from "./LanguageId"; import type { LocalSiteUrlBlocklist } from "./LocalSiteUrlBlocklist"; import type { MyUserInfo } from "./MyUserInfo"; +import type { OAuthProvider } from "./OAuthProvider"; import type { PersonView } from "./PersonView"; +import type { PublicOAuthProvider } from "./PublicOAuthProvider"; import type { SiteView } from "./SiteView"; import type { Tagline } from "./Tagline"; @@ -17,5 +19,7 @@ export interface GetSiteResponse { discussion_languages: Array; taglines: Array; custom_emojis: Array; + oauth_providers?: Array; + admin_oauth_providers?: Array; blocked_urls: Array; } diff --git a/src/types/PersonBlockView.ts b/src/types/ImageDetails.ts similarity index 50% rename from src/types/PersonBlockView.ts rename to src/types/ImageDetails.ts index 28a67645..8d350abe 100644 --- a/src/types/PersonBlockView.ts +++ b/src/types/ImageDetails.ts @@ -1,7 +1,8 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Person } from "./Person"; -export interface PersonBlockView { - person: Person; - target: Person; +export interface ImageDetails { + link: string; + width: number; + height: number; + content_type: string; } diff --git a/src/types/InstanceBlockView.ts b/src/types/InstanceBlockView.ts deleted file mode 100644 index 38087ca6..00000000 --- a/src/types/InstanceBlockView.ts +++ /dev/null @@ -1,10 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Instance } from "./Instance"; -import type { Person } from "./Person"; -import type { Site } from "./Site"; - -export interface InstanceBlockView { - person: Person; - instance: Instance; - site?: Site; -} diff --git a/src/types/LemmyErrorType.ts b/src/types/LemmyErrorType.ts index 16cc6653..9d73bc4b 100644 --- a/src/types/LemmyErrorType.ts +++ b/src/types/LemmyErrorType.ts @@ -29,6 +29,8 @@ export type LemmyErrorType = | { error: "not_top_admin" } | { error: "not_top_mod" } | { error: "not_logged_in" } + | { error: "not_higher_mod" } + | { error: "not_higher_admin" } | { error: "site_ban" } | { error: "deleted" } | { error: "banned_from_community" } @@ -44,6 +46,7 @@ export type LemmyErrorType = | { error: "couldnt_find_comment_reply" } | { error: "couldnt_find_private_message" } | { error: "couldnt_find_activity" } + | { error: "couldnt_find_oauth_provider" } | { error: "person_is_blocked" } | { error: "community_is_blocked" } | { error: "instance_is_blocked" } @@ -71,7 +74,9 @@ export type LemmyErrorType = | { error: "invalid_default_post_listing_type" } | { error: "registration_closed" } | { error: "registration_application_answer_required" } + | { error: "registration_username_required" } | { error: "email_already_exists" } + | { error: "username_already_exists" } | { error: "federation_forbidden_by_strict_allow_list" } | { error: "person_is_banned_from_community" } | { error: "object_is_not_public" } @@ -164,4 +169,10 @@ export type LemmyErrorType = | { error: "cant_block_local_instance" } | { error: "url_without_domain" } | { error: "inbox_timeout" } - | { error: "unknown"; message: string }; + | { error: "oauth_authorization_invalid" } + | { error: "oauth_login_failed" } + | { error: "oauth_registration_closed" } + | { error: "couldnt_delete_oauth_provider" } + | { error: "unknown"; message: string } + | { error: "cant_delete_site" } + | { error: "url_length_overflow" }; diff --git a/src/types/ListLoginsResponse.ts b/src/types/ListLoginsResponse.ts new file mode 100644 index 00000000..4a4c705b --- /dev/null +++ b/src/types/ListLoginsResponse.ts @@ -0,0 +1,6 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { LoginToken } from "./LoginToken"; + +export interface ListLoginsResponse { + logins: Array; +} diff --git a/src/types/LocalSite.ts b/src/types/LocalSite.ts index 0d2e24be..8d18f67e 100644 --- a/src/types/LocalSite.ts +++ b/src/types/LocalSite.ts @@ -11,7 +11,6 @@ export interface LocalSite { site_id: SiteId; site_setup: boolean; enable_downvotes: boolean; - enable_nsfw: boolean; community_creation_admin_only: boolean; require_email_verification: boolean; application_question?: string; @@ -33,4 +32,5 @@ export interface LocalSite { federation_signed_fetch: boolean; default_post_listing_mode: PostListingMode; default_sort_type: SortType; + oauth_registration: boolean; } diff --git a/src/types/LocalUser.ts b/src/types/LocalUser.ts index 86cd81a0..3057f43a 100644 --- a/src/types/LocalUser.ts +++ b/src/types/LocalUser.ts @@ -16,7 +16,6 @@ export interface LocalUser { interface_language: string; show_avatars: boolean; send_notifications_to_email: boolean; - show_scores: boolean; show_bot_accounts: boolean; show_read_posts: boolean; email_verified: boolean; diff --git a/src/types/LocalUserVoteDisplayMode.ts b/src/types/LocalUserVoteDisplayMode.ts index 141c02a0..ae93552c 100644 --- a/src/types/LocalUserVoteDisplayMode.ts +++ b/src/types/LocalUserVoteDisplayMode.ts @@ -1,8 +1,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { LocalUserId } from "./LocalUserId"; export interface LocalUserVoteDisplayMode { - local_user_id: LocalUserId; score: boolean; upvotes: boolean; downvotes: boolean; diff --git a/src/types/MyUserInfo.ts b/src/types/MyUserInfo.ts index ddde1190..70ec784c 100644 --- a/src/types/MyUserInfo.ts +++ b/src/types/MyUserInfo.ts @@ -1,18 +1,18 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { CommunityBlockView } from "./CommunityBlockView"; +import type { Community } from "./Community"; import type { CommunityFollowerView } from "./CommunityFollowerView"; import type { CommunityModeratorView } from "./CommunityModeratorView"; -import type { InstanceBlockView } from "./InstanceBlockView"; +import type { Instance } from "./Instance"; import type { LanguageId } from "./LanguageId"; import type { LocalUserView } from "./LocalUserView"; -import type { PersonBlockView } from "./PersonBlockView"; +import type { Person } from "./Person"; export interface MyUserInfo { local_user_view: LocalUserView; follows: Array; moderates: Array; - community_blocks: Array; - instance_blocks: Array; - person_blocks: Array; + community_blocks: Array; + instance_blocks: Array; + person_blocks: Array; discussion_languages: Array; } diff --git a/src/types/OAuthAccount.ts b/src/types/OAuthAccount.ts new file mode 100644 index 00000000..7d0c4186 --- /dev/null +++ b/src/types/OAuthAccount.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { LocalUserId } from "./LocalUserId"; +import type { OAuthProviderId } from "./OAuthProviderId"; + +export interface OAuthAccount { + local_user_id: LocalUserId; + oauth_provider_id: OAuthProviderId; + oauth_user_id: string; + published: string; + updated?: string; +} diff --git a/src/types/OAuthProvider.ts b/src/types/OAuthProvider.ts new file mode 100644 index 00000000..ffcfa031 --- /dev/null +++ b/src/types/OAuthProvider.ts @@ -0,0 +1,19 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { OAuthProviderId } from "./OAuthProviderId"; + +export interface OAuthProvider { + id: OAuthProviderId; + display_name: string; + issuer: string; + authorization_endpoint: string; + token_endpoint: string; + userinfo_endpoint: string; + id_claim: string; + client_id: string; + scopes: string; + auto_verify_email: boolean; + account_linking_enabled: boolean; + enabled: boolean; + published: string; + updated?: string; +} diff --git a/src/types/PersonBlockId.ts b/src/types/OAuthProviderId.ts similarity index 74% rename from src/types/PersonBlockId.ts rename to src/types/OAuthProviderId.ts index 7e41573b..a688d400 100644 --- a/src/types/PersonBlockId.ts +++ b/src/types/OAuthProviderId.ts @@ -1,3 +1,3 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -export type PersonBlockId = number; +export type OAuthProviderId = number; diff --git a/src/types/OAuthProviderInsertForm.ts b/src/types/OAuthProviderInsertForm.ts new file mode 100644 index 00000000..0a8d182d --- /dev/null +++ b/src/types/OAuthProviderInsertForm.ts @@ -0,0 +1,16 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export interface OAuthProviderInsertForm { + display_name: string; + issuer: string; + authorization_endpoint: string; + token_endpoint: string; + userinfo_endpoint: string; + id_claim: string; + client_id: string; + client_secret: string; + scopes: string; + auto_verify_email: boolean; + account_linking_enabled: boolean; + enabled: boolean; +} diff --git a/src/types/OAuthProviderUpdateForm.ts b/src/types/OAuthProviderUpdateForm.ts new file mode 100644 index 00000000..c25f8d31 --- /dev/null +++ b/src/types/OAuthProviderUpdateForm.ts @@ -0,0 +1,15 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export interface OAuthProviderUpdateForm { + display_name: string | null; + authorization_endpoint: string; + token_endpoint: string; + userinfo_endpoint: string; + id_claim: string | null; + client_secret: string | null; + scopes: string | null; + auto_verify_email: boolean | null; + account_linking_enabled: boolean | null; + enabled: boolean | null; + updated: string | null | null; +} diff --git a/src/types/PostView.ts b/src/types/PostView.ts index a17cd51f..c66de232 100644 --- a/src/types/PostView.ts +++ b/src/types/PostView.ts @@ -1,5 +1,6 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Community } from "./Community"; +import type { ImageDetails } from "./ImageDetails"; import type { Person } from "./Person"; import type { Post } from "./Post"; import type { PostAggregates } from "./PostAggregates"; @@ -9,6 +10,7 @@ export interface PostView { post: Post; creator: Person; community: Community; + image_details?: ImageDetails; creator_banned_from_community: boolean; banned_from_community: boolean; creator_is_moderator: boolean; diff --git a/src/types/PublicOAuthProvider.ts b/src/types/PublicOAuthProvider.ts new file mode 100644 index 00000000..9d5d0a02 --- /dev/null +++ b/src/types/PublicOAuthProvider.ts @@ -0,0 +1,4 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { OAuthProvider } from "./OAuthProvider"; + +export type PublicOAuthProvider = OAuthProvider; diff --git a/src/types/RegistrationApplication.ts b/src/types/RegistrationApplication.ts index 67c1a89b..12ce2f2f 100644 --- a/src/types/RegistrationApplication.ts +++ b/src/types/RegistrationApplication.ts @@ -1,9 +1,10 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { LocalUserId } from "./LocalUserId"; import type { PersonId } from "./PersonId"; +import type { RegistrationApplicationId } from "./RegistrationApplicationId"; export interface RegistrationApplication { - id: number; + id: RegistrationApplicationId; local_user_id: LocalUserId; answer: string; admin_id?: PersonId; diff --git a/src/types/RegistrationApplicationId.ts b/src/types/RegistrationApplicationId.ts new file mode 100644 index 00000000..3734700c --- /dev/null +++ b/src/types/RegistrationApplicationId.ts @@ -0,0 +1,3 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +export type RegistrationApplicationId = number; diff --git a/src/types/Search.ts b/src/types/Search.ts index da9817ef..6973e820 100644 --- a/src/types/Search.ts +++ b/src/types/Search.ts @@ -15,4 +15,5 @@ export interface Search { listing_type?: ListingType; page?: number; limit?: number; + post_title_only?: boolean; }