Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add URL blocklist #245

Merged
merged 4 commits into from Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/index.ts
Expand Up @@ -140,6 +140,7 @@ export { LocalImage } from "./types/LocalImage";
export { LocalSite } from "./types/LocalSite";
export { LocalSiteId } from "./types/LocalSiteId";
export { LocalSiteRateLimit } from "./types/LocalSiteRateLimit";
export { LocalSiteUrlBlocklist } from "./types/LocalSiteUrlBlocklist";
export { LocalUser } from "./types/LocalUser";
export { LocalUserId } from "./types/LocalUserId";
export { LocalUserView } from "./types/LocalUserView";
Expand Down
1 change: 1 addition & 0 deletions src/types/EditSite.ts
Expand Up @@ -44,6 +44,7 @@ export interface EditSite {
captcha_difficulty?: string;
allowed_instances?: Array<string>;
blocked_instances?: Array<string>;
blocked_urls?: Array<string>;
taglines?: Array<string>;
registration_mode?: RegistrationMode;
reports_email_admins?: boolean;
Expand Down
2 changes: 2 additions & 0 deletions src/types/GetSiteResponse.ts
Expand Up @@ -2,6 +2,7 @@
import type { CustomEmojiView } from "./CustomEmojiView";
import type { Language } from "./Language";
import type { LanguageId } from "./LanguageId";
import type { LocalSiteUrlBlocklist } from "./LocalSiteUrlBlocklist";
import type { MyUserInfo } from "./MyUserInfo";
import type { PersonView } from "./PersonView";
import type { SiteView } from "./SiteView";
Expand All @@ -16,4 +17,5 @@ export interface GetSiteResponse {
discussion_languages: Array<LanguageId>;
taglines: Array<Tagline>;
custom_emojis: Array<CustomEmojiView>;
blocked_urls: Array<LocalSiteUrlBlocklist>;
}
1 change: 1 addition & 0 deletions src/types/LemmyErrorType.ts
Expand Up @@ -125,6 +125,7 @@ export type LemmyErrorType =
| { error: "couldnt_set_all_registrations_accepted" }
| { error: "couldnt_set_all_email_verified" }
| { error: "banned" }
| { error: "blocked_url" }
| { error: "couldnt_get_comments" }
| { error: "couldnt_get_posts" }
| { error: "invalid_url" }
Expand Down
8 changes: 8 additions & 0 deletions src/types/LocalSiteUrlBlocklist.ts
@@ -0,0 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export interface LocalSiteUrlBlocklist {
id: number;
url: string;
published: string;
updated?: string;
}